backend/src/services/prdService.ts (Line 324:2 - Line 341:18), backend/src/services/prdService.ts (Line 208:7 - Line 167:13)
);
}
if (filters.templateId) {
query = query.where('prds.template_id', filters.templateId);
}
// Get total count
const totalResult = await query.clone().count('* as count').first();
const total = parseInt(totalResult?.count as string) || 0;
// Apply pagination
const page = filters.page || 1;
const limit = filters.limit || 20;
const offset = (page - 1) * limit;
const prds = await query
.orderBy('prds.created_at'
backend/src/services/memberService.ts (Line 198:51 - Line 210:38), backend/src/services/memberService.ts (Line 161:51 - Line 173:38)
);
}
const invitation = await db('team_invitations')
.where({ id: invitationId, team_id: teamId })
.first();
if (!invitation) {
throw ErrorFactory.notFound('Invitation not found');
}
if (invitation.status !== 'pending') {
throw ErrorFactory.validation('Can only cancel pending invitations'
backend/src/services/memberService.ts (Line 241:5 - Line 254:27), backend/src/services/teamService.ts (Line 174:5 - Line 187:37)
const member = await db('team_members')
.where({ team_id: teamId, user_id: memberId })
.first();
if (!member) {
throw ErrorFactory.notFound('Team member not found');
}
// Can't change your own role
if (adminId === memberId) {
throw ErrorFactory.forbidden('Cannot change your own role');
}
// Can't change owner role
backend/src/services/memberService.ts (Line 288:5 - Line 306:6), backend/src/services/teamService.ts (Line 217:5 - Line 235:33)
const member = await db('team_members')
.where({ team_id: teamId, user_id: memberId })
.first();
if (!member) {
throw ErrorFactory.notFound('Team member not found');
}
// Can't remove yourself
if (adminId === memberId) {
throw ErrorFactory.forbidden('Cannot remove yourself from the team');
}
// Can't remove owner
if (member.role === 'owner') {
throw ErrorFactory.forbidden('Cannot remove team owner');
}
const
backend/src/services/memberService.ts (Line 323:2 - Line 330:2), backend/src/services/teamService.ts (Line 248:2 - Line 258:23)
);
// If this was their current team, switch to another team or null
const user = await trx('users').where('id', memberId).first();
if (user && user.current_team_id === teamId) {
const otherTeam = await trx('team_members')
.join('teams', 'team_members.team_id', 'teams.id')
.where({
backend/src/services/marketplaceService.ts (Line 240:16 - Line 253:51), backend/src/services/publicGalleryService.ts (Line 183:16 - Line 196:6)
, 'desc');
break;
}
// Get total count
const totalQuery = query.clone().clearSelect().clearOrder().count('* as total');
const totalResult = await totalQuery.first();
const total = parseInt(totalResult?.total as string) || 0;
// Apply pagination
const offset = (page - 1) * limit;
const results = await query.limit(limit).offset(offset);
// Get creator stats and reviews for each template
backend/src/services/marketplaceService.ts (Line 296:2 - Line 312:17), backend/src/services/marketplaceService.ts (Line 172:2 - Line 188:12)
db('marketplace_templates as mt')
.leftJoin('prd_templates as pt', 'mt.template_id', 'pt.id')
.leftJoin('users as u', 'mt.creator_id', 'u.id')
.select([
'mt.*',
'pt.name as template_name',
'pt.description as template_description',
'pt.industry as template_industry',
'pt.complexity_level',
'pt.tags as template_tags',
'pt.sections',
'pt.content',
'u.name as creator_name',
'u.avatar_url as creator_avatar',
'u.bio as creator_bio'
])
.where('mt.template_id'
backend/src/services/emailMarketingService.ts (Line 505:11 - Line 511:14), backend/src/services/viralTrackingService.ts (Line 262:12 - Line 268:9)
frontend/node_modules/zod/src/v4/classic/tests/tuple.test.ts (Line 139:5 - Line 148:25), frontend/node_modules/zod/src/v4/classic/tests/tuple.test.ts (Line 116:7 - Line 125:52)
],
["asdf", 1234, "asdf", "asdf"],
["asdf", 1234, "asdf", true, false, "asdf"],
];
for (const data of badData) {
expect(() => myTuple.parse(data)).toThrow();
}
});
test("tuple with rest schema"
frontend/node_modules/zod/src/v4/classic/tests/transform.test.ts (Line 35:2 - Line 46:2), frontend/node_modules/zod/src/v4/classic/tests/transform.test.ts (Line 6:2 - Line 16:2)
(data, ctx) => {
const i = strs.indexOf(data);
if (i === -1) {
ctx.addIssue({
input: data,
code: "custom",
message: `${data} is not one of our allowed strings`,
});
}
return data.length;
})
.
frontend/node_modules/zod/src/v4/classic/tests/stringbool.test.ts (Line 9:2 - Line 33:2), frontend/node_modules/zod/src/v4/mini/tests/index.test.ts (Line 747:11 - Line 772:6)
frontend/node_modules/zod/src/v4/classic/tests/set.test.ts (Line 75:2 - Line 81:41), frontend/node_modules/zod/src/v4/classic/tests/set.test.ts (Line 68:2 - Line 74:42)
));
expect(result.success).toEqual(false);
expect(result.error!.issues.length).toEqual(1);
expect(result.error!.issues[0].code).toEqual("too_small");
});
test("failing when set is bigger than max() "
frontend/node_modules/zod/src/v4/classic/tests/registries.test.ts (Line 187:7 - Line 197:16), frontend/node_modules/zod/src/v4/classic/tests/registries.test.ts (Line 172:2 - Line 182:33)
frontend/node_modules/zod/src/v4/classic/tests/refine.test.ts (Line 141:6 - Line 155:37), frontend/node_modules/zod/src/v4/classic/tests/refine.test.ts (Line 119:6 - Line 133:38)
,
});
}
})
.refine((_) => false);
const result = schema.safeParse("");
expect(result.success).toEqual(false);
if (!result.success) {
expect(result.error.issues.length).toEqual(1);
expect(result.error.issues[0].message).toEqual("BAD");
}
});
test("should abort early with abort flag"
frontend/node_modules/zod/src/v4/classic/tests/refine.test.ts (Line 158:2 - Line 165:2), frontend/node_modules/zod/src/v4/classic/tests/refine.test.ts (Line 122:7 - Line 129:7)
})
.refine((_) => false);
const result = schema.safeParse("");
expect(result.success).toEqual(false);
if (!result.success) {
expect(result.error.issues.length).toEqual(1);
}
frontend/node_modules/zod/src/v4/classic/tests/refine.test.ts (Line 229:10 - Line 244:6), frontend/node_modules/zod/src/v4/classic/tests/refine.test.ts (Line 193:6 - Line 208:8)
: true,
message: "Too many items 😡",
});
}
if (val.length !== new Set(val).size) {
ctx.addIssue({
input: val,
code: "custom",
message: `No duplicates allowed.`,
});
}
});
// Should fail with too many items and duplicates
const result = await
frontend/node_modules/zod/src/v4/classic/tests/refine.test.ts (Line 289:2 - Line 295:6), frontend/node_modules/zod/src/v4/classic/tests/refine.test.ts (Line 123:6 - Line 129:6)
);
const result = schema.safeParse("");
expect(result.success).toEqual(false);
if (!result.success) {
expect(result.error.issues.length).toEqual(1);
expect(result.error.issues[0].message).toEqual("foo"
frontend/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts (Line 2:9 - Line 27:2), frontend/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts (Line 2:14 - Line 27:2)
frontend/node_modules/zod/src/v4/classic/tests/firstparty.test.ts (Line 97:6 - Line 173:5), frontend/node_modules/zod/src/v4/classic/tests/firstparty.test.ts (Line 11:9 - Line 86:4)
:
break;
case "bigint":
break;
case "boolean":
break;
case "date":
break;
case "symbol":
break;
case "undefined":
break;
case "null":
break;
case "any":
break;
case "unknown":
break;
case "never":
break;
case "void":
break;
case "array":
break;
case "object":
break;
case "union":
break;
case "intersection":
break;
case "tuple":
break;
case "record":
break;
case "map":
break;
case "set":
break;
case "literal":
break;
case "enum":
break;
case "promise":
break;
case "optional":
break;
case "nonoptional":
break;
case "nullable":
break;
case "default":
break;
case "prefault":
break;
case "template_literal":
break;
case "custom":
break;
case "transform":
break;
case "readonly":
break;
case "nan":
break;
case "pipe":
break;
case "success":
break;
case "catch":
break;
case "file":
break;
case "lazy":
break;
default:
expectTypeOf(type
frontend/node_modules/zod/src/v4/classic/tests/error.test.ts (Line 149:2 - Line 164:16), frontend/node_modules/zod/src/v4/classic/tests/error.test.ts (Line 129:11 - Line 144:31)
frontend/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts (Line 227:42 - Line 233:4), frontend/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts (Line 145:30 - Line 151:4)
, () => {
const result = z
.discriminatedUnion("type", [
z.object({ type: z.literal("a"), a: z.string() }),
z.object({ type: z.literal("b"), b: z.string() }),
])
.safeParse({ type: "a"
frontend/node_modules/zod/src/v4/classic/tests/default.test.ts (Line 36:10 - Line 44:22), frontend/node_modules/zod/src/v4/classic/tests/default.test.ts (Line 23:13 - Line 31:31)
);
type inp = z.input<typeof stringWithDefault>;
expectTypeOf<inp>().toEqualTypeOf<string | undefined>();
type out = z.output<typeof stringWithDefault>;
expectTypeOf<out>().toEqualTypeOf<string>();
});
test("optional on default"
frontend/node_modules/zod/src/v4/classic/tests/default.test.ts (Line 45:2 - Line 50:2), frontend/node_modules/zod/src/v4/classic/tests/default.test.ts (Line 23:13 - Line 28:2)
);
type inp = z.input<typeof stringWithDefault>;
expectTypeOf<inp>().toEqualTypeOf<string | undefined>();
type out = z.output<typeof stringWithDefault>;
expectTypeOf<out>().toEqualTypeOf<string |
frontend/node_modules/zod/src/v4/classic/tests/datetime.test.ts (Line 37:7 - Line 43:36), frontend/node_modules/zod/src/v4/classic/tests/datetime.test.ts (Line 27:22 - Line 33:36)
frontend/node_modules/sucrase/node_modules/glob/dist/commonjs/processor.d.ts (Line 1:1 - Line 59:40), frontend/node_modules/sucrase/node_modules/glob/dist/esm/processor.d.ts (Line 1:1 - Line 59:40)
import { MMRegExp } from 'minimatch';
import { Path } from 'path-scurry';
import { Pattern } from './pattern.js';
import { GlobWalkerOpts } from './walker.js';
/**
* A cache of which patterns have been processed for a given Path
*/
export declare class HasWalkedCache {
store: Map<string, Set<string>>;
constructor(store?: Map<string, Set<string>>);
copy(): HasWalkedCache;
hasWalked(target: Path, pattern: Pattern): boolean | undefined;
storeWalked(target: Path, pattern: Pattern): void;
}
/**
* A record of which paths have been matched in a given walk step,
* and whether they only are considered a match if they are a directory,
* and whether their absolute or relative path should be returned.
*/
export declare class MatchRecord {
store: Map<Path, number>;
add(target: Path, absolute: boolean, ifDir: boolean): void;
entries(): [Path, boolean, boolean][];
}
/**
* A collection of patterns that must be processed in a subsequent step
* for a given path.
*/
export declare class SubWalks {
store: Map<Path, Pattern[]>;
add(target: Path, pattern: Pattern): void;
get(target: Path): Pattern[];
entries(): [Path, Pattern[]][];
keys(): Path[];
}
/**
* The class that processes patterns for a given path.
*
* Handles child entry filtering, and determining whether a path's
* directory contents must be read.
*/
export declare class Processor {
hasWalkedCache: HasWalkedCache;
matches: MatchRecord;
subwalks: SubWalks;
patterns?: Pattern[];
follow: boolean;
dot: boolean;
opts: GlobWalkerOpts;
constructor(opts: GlobWalkerOpts, hasWalkedCache?: HasWalkedCache);
processPatterns(target: Path, patterns: Pattern[]): this;
subwalkTargets(): Path[];
child(): Processor;
filterEntries(parent: Path, entries: Path[]): Processor;
testGlobstar(e: Path, pattern: Pattern, rest: Pattern | null, absolute: boolean): void;
testRegExp(e: Path, p: MMRegExp, rest: Pattern | null, absolute: boolean): void;
testString(e: Path, p: string, rest: Pattern | null, absolute: boolean): void;
}
//# sourceMappingURL=processor.d.ts.map
frontend/node_modules/sucrase/node_modules/glob/dist/commonjs/pattern.d.ts (Line 1:1 - Line 76:38), frontend/node_modules/sucrase/node_modules/glob/dist/esm/pattern.d.ts (Line 1:1 - Line 76:38)
import { GLOBSTAR } from 'minimatch';
export type MMPattern = string | RegExp | typeof GLOBSTAR;
export type PatternList = [p: MMPattern, ...rest: MMPattern[]];
export type UNCPatternList = [
p0: '',
p1: '',
p2: string,
p3: string,
...rest: MMPattern[]
];
export type DrivePatternList = [p0: string, ...rest: MMPattern[]];
export type AbsolutePatternList = [p0: '', ...rest: MMPattern[]];
export type GlobList = [p: string, ...rest: string[]];
/**
* An immutable-ish view on an array of glob parts and their parsed
* results
*/
export declare class Pattern {
#private;
readonly length: number;
constructor(patternList: MMPattern[], globList: string[], index: number, platform: NodeJS.Platform);
/**
* The first entry in the parsed list of patterns
*/
pattern(): MMPattern;
/**
* true of if pattern() returns a string
*/
isString(): boolean;
/**
* true of if pattern() returns GLOBSTAR
*/
isGlobstar(): boolean;
/**
* true if pattern() returns a regexp
*/
isRegExp(): boolean;
/**
* The /-joined set of glob parts that make up this pattern
*/
globString(): string;
/**
* true if there are more pattern parts after this one
*/
hasMore(): boolean;
/**
* The rest of the pattern after this part, or null if this is the end
*/
rest(): Pattern | null;
/**
* true if the pattern represents a //unc/path/ on windows
*/
isUNC(): boolean;
/**
* True if the pattern starts with a drive letter on Windows
*/
isDrive(): boolean;
/**
* True if the pattern is rooted on an absolute path
*/
isAbsolute(): boolean;
/**
* consume the root of the pattern, and return it
*/
root(): string;
/**
* Check to see if the current globstar pattern is allowed to follow
* a symbolic link.
*/
checkFollowGlobstar(): boolean;
/**
* Mark that the current globstar pattern is following a symbolic link
*/
markFollowGlobstar(): boolean;
}
//# sourceMappingURL=pattern.d.ts.map
frontend/node_modules/sucrase/node_modules/glob/dist/commonjs/index.d.ts (Line 1:1 - Line 97:36), frontend/node_modules/sucrase/node_modules/glob/dist/esm/index.d.ts (Line 1:1 - Line 97:36)
import { Minipass } from 'minipass';
import { Path } from 'path-scurry';
import type { GlobOptions, GlobOptionsWithFileTypesFalse, GlobOptionsWithFileTypesTrue, GlobOptionsWithFileTypesUnset } from './glob.js';
import { Glob } from './glob.js';
export { escape, unescape } from 'minimatch';
export type { FSOption, Path, WalkOptions, WalkOptionsWithFileTypesTrue, WalkOptionsWithFileTypesUnset, } from 'path-scurry';
export { Glob } from './glob.js';
export type { GlobOptions, GlobOptionsWithFileTypesFalse, GlobOptionsWithFileTypesTrue, GlobOptionsWithFileTypesUnset, } from './glob.js';
export { hasMagic } from './has-magic.js';
export { Ignore } from './ignore.js';
export type { IgnoreLike } from './ignore.js';
export type { MatchStream } from './walker.js';
/**
* Syncronous form of {@link globStream}. Will read all the matches as fast as
* you consume them, even all in a single tick if you consume them immediately,
* but will still respond to backpressure if they're not consumed immediately.
*/
export declare function globStreamSync(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): Minipass<Path, Path>;
export declare function globStreamSync(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): Minipass<string, string>;
export declare function globStreamSync(pattern: string | string[], options: GlobOptionsWithFileTypesUnset): Minipass<string, string>;
export declare function globStreamSync(pattern: string | string[], options: GlobOptions): Minipass<Path, Path> | Minipass<string, string>;
/**
* Return a stream that emits all the strings or `Path` objects and
* then emits `end` when completed.
*/
export declare function globStream(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): Minipass<string, string>;
export declare function globStream(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): Minipass<Path, Path>;
export declare function globStream(pattern: string | string[], options?: GlobOptionsWithFileTypesUnset | undefined): Minipass<string, string>;
export declare function globStream(pattern: string | string[], options: GlobOptions): Minipass<Path, Path> | Minipass<string, string>;
/**
* Synchronous form of {@link glob}
*/
export declare function globSync(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): string[];
export declare function globSync(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): Path[];
export declare function globSync(pattern: string | string[], options?: GlobOptionsWithFileTypesUnset | undefined): string[];
export declare function globSync(pattern: string | string[], options: GlobOptions): Path[] | string[];
/**
* Perform an asynchronous glob search for the pattern(s) specified. Returns
* [Path](https://isaacs.github.io/path-scurry/classes/PathBase) objects if the
* {@link withFileTypes} option is set to `true`. See {@link GlobOptions} for
* full option descriptions.
*/
declare function glob_(pattern: string | string[], options?: GlobOptionsWithFileTypesUnset | undefined): Promise<string[]>;
declare function glob_(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): Promise<Path[]>;
declare function glob_(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): Promise<string[]>;
declare function glob_(pattern: string | string[], options: GlobOptions): Promise<Path[] | string[]>;
/**
* Return a sync iterator for walking glob pattern matches.
*/
export declare function globIterateSync(pattern: string | string[], options?: GlobOptionsWithFileTypesUnset | undefined): Generator<string, void, void>;
export declare function globIterateSync(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): Generator<Path, void, void>;
export declare function globIterateSync(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): Generator<string, void, void>;
export declare function globIterateSync(pattern: string | string[], options: GlobOptions): Generator<Path, void, void> | Generator<string, void, void>;
/**
* Return an async iterator for walking glob pattern matches.
*/
export declare function globIterate(pattern: string | string[], options?: GlobOptionsWithFileTypesUnset | undefined): AsyncGenerator<string, void, void>;
export declare function globIterate(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): AsyncGenerator<Path, void, void>;
export declare function globIterate(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): AsyncGenerator<string, void, void>;
export declare function globIterate(pattern: string | string[], options: GlobOptions): AsyncGenerator<Path, void, void> | AsyncGenerator<string, void, void>;
export declare const streamSync: typeof globStreamSync;
export declare const stream: typeof globStream & {
sync: typeof globStreamSync;
};
export declare const iterateSync: typeof globIterateSync;
export declare const iterate: typeof globIterate & {
sync: typeof globIterateSync;
};
export declare const sync: typeof globSync & {
stream: typeof globStreamSync;
iterate: typeof globIterateSync;
};
export declare const glob: typeof glob_ & {
glob: typeof glob_;
globSync: typeof globSync;
sync: typeof globSync & {
stream: typeof globStreamSync;
iterate: typeof globIterateSync;
};
globStream: typeof globStream;
stream: typeof globStream & {
sync: typeof globStreamSync;
};
globStreamSync: typeof globStreamSync;
streamSync: typeof globStreamSync;
globIterate: typeof globIterate;
iterate: typeof globIterate & {
sync: typeof globIterateSync;
};
globIterateSync: typeof globIterateSync;
iterateSync: typeof globIterateSync;
Glob: typeof Glob;
hasMagic: (pattern: string | string[], options?: GlobOptions) => boolean;
escape: (s: string, { windowsPathsNoEscape, }?: Pick<import("minimatch").MinimatchOptions, "windowsPathsNoEscape">) => string;
unescape: (s: string, { windowsPathsNoEscape, }?: Pick<import("minimatch").MinimatchOptions, "windowsPathsNoEscape">) => string;
};
//# sourceMappingURL=index.d.ts.map
frontend/node_modules/sucrase/node_modules/glob/dist/commonjs/ignore.d.ts (Line 1:1 - Line 24:37), frontend/node_modules/sucrase/node_modules/glob/dist/esm/ignore.d.ts (Line 1:1 - Line 24:37)
frontend/node_modules/sucrase/node_modules/glob/dist/commonjs/glob.d.ts (Line 1:1 - Line 388:35), frontend/node_modules/sucrase/node_modules/glob/dist/esm/glob.d.ts (Line 1:1 - Line 388:35)
import { Minimatch } from 'minimatch';
import { Minipass } from 'minipass';
import { FSOption, Path, PathScurry } from 'path-scurry';
import { IgnoreLike } from './ignore.js';
import { Pattern } from './pattern.js';
export type MatchSet = Minimatch['set'];
export type GlobParts = Exclude<Minimatch['globParts'], undefined>;
/**
* A `GlobOptions` object may be provided to any of the exported methods, and
* must be provided to the `Glob` constructor.
*
* All options are optional, boolean, and false by default, unless otherwise
* noted.
*
* All resolved options are added to the Glob object as properties.
*
* If you are running many `glob` operations, you can pass a Glob object as the
* `options` argument to a subsequent operation to share the previously loaded
* cache.
*/
export interface GlobOptions {
/**
* Set to `true` to always receive absolute paths for
* matched files. Set to `false` to always return relative paths.
*
* When this option is not set, absolute paths are returned for patterns
* that are absolute, and otherwise paths are returned that are relative
* to the `cwd` setting.
*
* This does _not_ make an extra system call to get
* the realpath, it only does string path resolution.
*
* Conflicts with {@link withFileTypes}
*/
absolute?: boolean;
/**
* Set to false to enable {@link windowsPathsNoEscape}
*
* @deprecated
*/
allowWindowsEscape?: boolean;
/**
* The current working directory in which to search. Defaults to
* `process.cwd()`.
*
* May be eiher a string path or a `file://` URL object or string.
*/
cwd?: string | URL;
/**
* Include `.dot` files in normal matches and `globstar`
* matches. Note that an explicit dot in a portion of the pattern
* will always match dot files.
*/
dot?: boolean;
/**
* Prepend all relative path strings with `./` (or `.\` on Windows).
*
* Without this option, returned relative paths are "bare", so instead of
* returning `'./foo/bar'`, they are returned as `'foo/bar'`.
*
* Relative patterns starting with `'../'` are not prepended with `./`, even
* if this option is set.
*/
dotRelative?: boolean;
/**
* Follow symlinked directories when expanding `**`
* patterns. This can result in a lot of duplicate references in
* the presence of cyclic links, and make performance quite bad.
*
* By default, a `**` in a pattern will follow 1 symbolic link if
* it is not the first item in the pattern, or none if it is the
* first item in the pattern, following the same behavior as Bash.
*/
follow?: boolean;
/**
* string or string[], or an object with `ignore` and `ignoreChildren`
* methods.
*
* If a string or string[] is provided, then this is treated as a glob
* pattern or array of glob patterns to exclude from matches. To ignore all
* children within a directory, as well as the entry itself, append `'/**'`
* to the ignore pattern.
*
* **Note** `ignore` patterns are _always_ in `dot:true` mode, regardless of
* any other settings.
*
* If an object is provided that has `ignored(path)` and/or
* `childrenIgnored(path)` methods, then these methods will be called to
* determine whether any Path is a match or if its children should be
* traversed, respectively.
*/
ignore?: string | string[] | IgnoreLike;
/**
* Treat brace expansion like `{a,b}` as a "magic" pattern. Has no
* effect if {@link nobrace} is set.
*
* Only has effect on the {@link hasMagic} function.
*/
magicalBraces?: boolean;
/**
* Add a `/` character to directory matches. Note that this requires
* additional stat calls in some cases.
*/
mark?: boolean;
/**
* Perform a basename-only match if the pattern does not contain any slash
* characters. That is, `*.js` would be treated as equivalent to
* `**\/*.js`, matching all js files in all directories.
*/
matchBase?: boolean;
/**
* Limit the directory traversal to a given depth below the cwd.
* Note that this does NOT prevent traversal to sibling folders,
* root patterns, and so on. It only limits the maximum folder depth
* that the walk will descend, relative to the cwd.
*/
maxDepth?: number;
/**
* Do not expand `{a,b}` and `{1..3}` brace sets.
*/
nobrace?: boolean;
/**
* Perform a case-insensitive match. This defaults to `true` on macOS and
* Windows systems, and `false` on all others.
*
* **Note** `nocase` should only be explicitly set when it is
* known that the filesystem's case sensitivity differs from the
* platform default. If set `true` on case-sensitive file
* systems, or `false` on case-insensitive file systems, then the
* walk may return more or less results than expected.
*/
nocase?: boolean;
/**
* Do not match directories, only files. (Note: to match
* _only_ directories, put a `/` at the end of the pattern.)
*/
nodir?: boolean;
/**
* Do not match "extglob" patterns such as `+(a|b)`.
*/
noext?: boolean;
/**
* Do not match `**` against multiple filenames. (Ie, treat it as a normal
* `*` instead.)
*
* Conflicts with {@link matchBase}
*/
noglobstar?: boolean;
/**
* Defaults to value of `process.platform` if available, or `'linux'` if
* not. Setting `platform:'win32'` on non-Windows systems may cause strange
* behavior.
*/
platform?: NodeJS.Platform;
/**
* Set to true to call `fs.realpath` on all of the
* results. In the case of an entry that cannot be resolved, the
* entry is omitted. This incurs a slight performance penalty, of
* course, because of the added system calls.
*/
realpath?: boolean;
/**
*
* A string path resolved against the `cwd` option, which
* is used as the starting point for absolute patterns that start
* with `/`, (but not drive letters or UNC paths on Windows).
*
* Note that this _doesn't_ necessarily limit the walk to the
* `root` directory, and doesn't affect the cwd starting point for
* non-absolute patterns. A pattern containing `..` will still be
* able to traverse out of the root directory, if it is not an
* actual root directory on the filesystem, and any non-absolute
* patterns will be matched in the `cwd`. For example, the
* pattern `/../*` with `{root:'/some/path'}` will return all
* files in `/some`, not all files in `/some/path`. The pattern
* `*` with `{root:'/some/path'}` will return all the entries in
* the cwd, not the entries in `/some/path`.
*
* To start absolute and non-absolute patterns in the same
* path, you can use `{root:''}`. However, be aware that on
* Windows systems, a pattern like `x:/*` or `//host/share/*` will
* _always_ start in the `x:/` or `//host/share` directory,
* regardless of the `root` setting.
*/
root?: string;
/**
* A [PathScurry](http://npm.im/path-scurry) object used
* to traverse the file system. If the `nocase` option is set
* explicitly, then any provided `scurry` object must match this
* setting.
*/
scurry?: PathScurry;
/**
* Call `lstat()` on all entries, whether required or not to determine
* if it's a valid match. When used with {@link withFileTypes}, this means
* that matches will include data such as modified time, permissions, and
* so on. Note that this will incur a performance cost due to the added
* system calls.
*/
stat?: boolean;
/**
* An AbortSignal which will cancel the Glob walk when
* triggered.
*/
signal?: AbortSignal;
/**
* Use `\\` as a path separator _only_, and
* _never_ as an escape character. If set, all `\\` characters are
* replaced with `/` in the pattern.
*
* Note that this makes it **impossible** to match against paths
* containing literal glob pattern characters, but allows matching
* with patterns constructed using `path.join()` and
* `path.resolve()` on Windows platforms, mimicking the (buggy!)
* behavior of Glob v7 and before on Windows. Please use with
* caution, and be mindful of [the caveat below about Windows
* paths](#windows). (For legacy reasons, this is also set if
* `allowWindowsEscape` is set to the exact value `false`.)
*/
windowsPathsNoEscape?: boolean;
/**
* Return [PathScurry](http://npm.im/path-scurry)
* `Path` objects instead of strings. These are similar to a
* NodeJS `Dirent` object, but with additional methods and
* properties.
*
* Conflicts with {@link absolute}
*/
withFileTypes?: boolean;
/**
* An fs implementation to override some or all of the defaults. See
* http://npm.im/path-scurry for details about what can be overridden.
*/
fs?: FSOption;
/**
* Just passed along to Minimatch. Note that this makes all pattern
* matching operations slower and *extremely* noisy.
*/
debug?: boolean;
/**
* Return `/` delimited paths, even on Windows.
*
* On posix systems, this has no effect. But, on Windows, it means that
* paths will be `/` delimited, and absolute paths will be their full
* resolved UNC forms, eg instead of `'C:\\foo\\bar'`, it would return
* `'//?/C:/foo/bar'`
*/
posix?: boolean;
/**
* Do not match any children of any matches. For example, the pattern
* `**\/foo` would match `a/foo`, but not `a/foo/b/foo` in this mode.
*
* This is especially useful for cases like "find all `node_modules`
* folders, but not the ones in `node_modules`".
*
* In order to support this, the `Ignore` implementation must support an
* `add(pattern: string)` method. If using the default `Ignore` class, then
* this is fine, but if this is set to `false`, and a custom `Ignore` is
* provided that does not have an `add()` method, then it will throw an
* error.
*
* **Caveat** It *only* ignores matches that would be a descendant of a
* previous match, and only if that descendant is matched *after* the
* ancestor is encountered. Since the file system walk happens in
* indeterminate order, it's possible that a match will already be added
* before its ancestor, if multiple or braced patterns are used.
*
* For example:
*
* ```ts
* const results = await glob([
* // likely to match first, since it's just a stat
* 'a/b/c/d/e/f',
*
* // this pattern is more complicated! It must to various readdir()
* // calls and test the results against a regular expression, and that
* // is certainly going to take a little bit longer.
* //
* // So, later on, it encounters a match at 'a/b/c/d/e', but it's too
* // late to ignore a/b/c/d/e/f, because it's already been emitted.
* 'a/[bdf]/?/[a-z]/*',
* ], { includeChildMatches: false })
* ```
*
* It's best to only set this to `false` if you can be reasonably sure that
* no components of the pattern will potentially match one another's file
* system descendants, or if the occasional included child entry will not
* cause problems.
*
* @default true
*/
includeChildMatches?: boolean;
}
export type GlobOptionsWithFileTypesTrue = GlobOptions & {
withFileTypes: true;
absolute?: undefined;
mark?: undefined;
posix?: undefined;
};
export type GlobOptionsWithFileTypesFalse = GlobOptions & {
withFileTypes?: false;
};
export type GlobOptionsWithFileTypesUnset = GlobOptions & {
withFileTypes?: undefined;
};
export type Result<Opts> = Opts extends GlobOptionsWithFileTypesTrue ? Path : Opts extends GlobOptionsWithFileTypesFalse ? string : Opts extends GlobOptionsWithFileTypesUnset ? string : string | Path;
export type Results<Opts> = Result<Opts>[];
export type FileTypes<Opts> = Opts extends GlobOptionsWithFileTypesTrue ? true : Opts extends GlobOptionsWithFileTypesFalse ? false : Opts extends GlobOptionsWithFileTypesUnset ? false : boolean;
/**
* An object that can perform glob pattern traversals.
*/
export declare class Glob<Opts extends GlobOptions> implements GlobOptions {
absolute?: boolean;
cwd: string;
root?: string;
dot: boolean;
dotRelative: boolean;
follow: boolean;
ignore?: string | string[] | IgnoreLike;
magicalBraces: boolean;
mark?: boolean;
matchBase: boolean;
maxDepth: number;
nobrace: boolean;
nocase: boolean;
nodir: boolean;
noext: boolean;
noglobstar: boolean;
pattern: string[];
platform: NodeJS.Platform;
realpath: boolean;
scurry: PathScurry;
stat: boolean;
signal?: AbortSignal;
windowsPathsNoEscape: boolean;
withFileTypes: FileTypes<Opts>;
includeChildMatches: boolean;
/**
* The options provided to the constructor.
*/
opts: Opts;
/**
* An array of parsed immutable {@link Pattern} objects.
*/
patterns: Pattern[];
/**
* All options are stored as properties on the `Glob` object.
*
* See {@link GlobOptions} for full options descriptions.
*
* Note that a previous `Glob` object can be passed as the
* `GlobOptions` to another `Glob` instantiation to re-use settings
* and caches with a new pattern.
*
* Traversal functions can be called multiple times to run the walk
* again.
*/
constructor(pattern: string | string[], opts: Opts);
/**
* Returns a Promise that resolves to the results array.
*/
walk(): Promise<Results<Opts>>;
/**
* synchronous {@link Glob.walk}
*/
walkSync(): Results<Opts>;
/**
* Stream results asynchronously.
*/
stream(): Minipass<Result<Opts>, Result<Opts>>;
/**
* Stream results synchronously.
*/
streamSync(): Minipass<Result<Opts>, Result<Opts>>;
/**
* Default sync iteration function. Returns a Generator that
* iterates over the results.
*/
iterateSync(): Generator<Result<Opts>, void, void>;
[Symbol.iterator](): Generator<Result<Opts>, void, void>;
/**
* Default async iteration function. Returns an AsyncGenerator that
* iterates over the results.
*/
iterate(): AsyncGenerator<Result<Opts>, void, void>;
[Symbol.asyncIterator](): AsyncGenerator<Result<Opts>, void, void>;
}
//# sourceMappingURL=glob.d.ts.map
frontend/node_modules/@hookform/resolvers/valibot/src/__tests__/valibot.ts (Line 35:92 - Line 47:12), frontend/node_modules/@hookform/resolvers/valibot/src/__tests__/valibot.ts (Line 16:90 - Line 28:10)
frontend/node_modules/@hookform/resolvers/class-validator/src/__tests__/class-validator.ts (Line 69:7 - Line 78:125), frontend/node_modules/@hookform/resolvers/yup/src/__tests__/yup.ts (Line 55:7 - Line 64:114)
, undefined, {
mode: 'sync',
})(invalidData, undefined, { fields, shouldUseNativeValidation });
expect(validateSyncSpy).toHaveBeenCalledTimes(1);
expect(validateSpy).not.toHaveBeenCalled();
expect(result).toMatchSnapshot();
});
it('should return all the errors from classValidatorResolver when validation fails with `validateAllFieldCriteria` set to true'
frontend/node_modules/@hookform/resolvers/class-validator/src/__tests__/class-validator.ts (Line 134:38 - Line 150:10), frontend/node_modules/@hookform/resolvers/class-validator/src/__tests__/class-validator.ts (Line 105:40 - Line 121:12)
, async () => {
class SchemaTest {
@Expose({ groups: ['find', 'create', 'update'] })
@Type(() => Number)
@IsDefined({
message: `All fields must be defined.`,
groups: ['publish'],
})
@IsNumber({}, { message: `Must be a number`, always: true })
@Min(0, { message: `Cannot be lower than 0`, always: true })
@Max(255, { message: `Cannot be greater than 255`, always: true })
random: number;
}
const result = await classValidatorResolver(
SchemaTest,
{ validator
frontend/node_modules/zod/src/v4/locales/zh-CN.ts (Line 1:1 - Line 7:5), frontend/node_modules/zod/src/v4/locales/zh-TW.ts (Line 1:1 - Line 7:5)
import type { $ZodStringFormats } from "../core/checks.js";
import type * as errors from "../core/errors.js";
import * as util from "../core/util.js";
const error: () => errors.$ZodErrorMap = () => {
const Sizable: Record<string, { unit: string; verb: string }> = {
string: { unit: "字符"
frontend/node_modules/zod/src/v4/locales/zh-CN.ts (Line 10:2 - Line 22:11), frontend/node_modules/zod/src/v4/locales/zh-TW.ts (Line 10:2 - Line 22:6)
frontend/node_modules/zod/src/v4/classic/checks.ts (Line 5:4 - Line 30:2), frontend/node_modules/zod/src/v4/mini/checks.ts (Line 7:8 - Line 32:2)
,
_positive as positive,
_negative as negative,
_nonpositive as nonpositive,
_nonnegative as nonnegative,
_multipleOf as multipleOf,
_maxSize as maxSize,
_minSize as minSize,
_size as size,
_maxLength as maxLength,
_minLength as minLength,
_length as length,
_regex as regex,
_lowercase as lowercase,
_uppercase as uppercase,
_includes as includes,
_startsWith as startsWith,
_endsWith as endsWith,
_property as property,
_mime as mime,
_overwrite as overwrite,
_normalize as normalize,
_trim as trim,
_toLowerCase as toLowerCase,
_toUpperCase as toUpperCase,
} from "../core/index.js";
frontend/node_modules/zod/src/v3/tests/void.test.ts (Line 5:21 - Line 14:5), frontend/node_modules/zod/src/v4/classic/tests/void.test.ts (Line 2:9 - Line 11:13)
;
test("void", () => {
const v = z.void();
v.parse(undefined);
expect(() => v.parse(null)).toThrow();
expect(() => v.parse("")).toThrow();
type v = z.infer<typeof v>;
util
frontend/node_modules/zod/src/v3/tests/unions.test.ts (Line 4:9 - Line 30:35), frontend/node_modules/zod/src/v4/classic/tests/union.test.ts (Line 3:9 - Line 29:37)
frontend/node_modules/zod/src/v3/tests/transformer.test.ts (Line 41:3 - Line 53:5), frontend/node_modules/zod/src/v4/classic/tests/transform.test.ts (Line 27:4 - Line 39:6)
);
});
test("transform ctx.addIssue with parseAsync", async () => {
const strs = ["foo", "bar"];
const result = await z
.string()
.transform(async (data, ctx) => {
const i = strs.indexOf(data);
if (i === -1) {
ctx.addIssue({
code
frontend/node_modules/zod/src/v3/tests/transformer.test.ts (Line 49:2 - Line 59:15), frontend/node_modules/zod/src/v3/tests/transformer.test.ts (Line 18:2 - Line 28:6)
(data, ctx) => {
const i = strs.indexOf(data);
if (i === -1) {
ctx.addIssue({
code: "custom",
message: `${data} is not one of our allowed strings`,
});
}
return data.length;
})
.safeParseAsync
frontend/node_modules/zod/src/v3/tests/transformer.test.ts (Line 88:5 - Line 126:7), frontend/node_modules/zod/src/v4/classic/tests/transform.test.ts (Line 78:2 - Line 116:6)
frontend/node_modules/zod/src/v3/tests/string.test.ts (Line 817:7 - Line 833:19), frontend/node_modules/zod/src/v4/classic/tests/datetime.test.ts (Line 264:3 - Line 280:23)
];
for (const val of validDurations) {
const result = duration.safeParse(val);
if (!result.success) {
throw Error(`Valid duration could not be parsed: ${val}`);
}
}
for (const val of invalidDurations) {
const result = duration.safeParse(val);
if (result.success) {
throw Error(`Invalid duration was successful parsed: ${val}`);
}
expect(result.error.issues[0].message).toEqual("Invalid duration"
frontend/node_modules/zod/src/v3/tests/standard-schema.test.ts (Line 74:5 - Line 80:5), frontend/node_modules/zod/src/v3/tests/standard-schema.test.ts (Line 45:3 - Line 51:2)
expect(result.issues).toBeDefined();
if (!result.issues) {
throw new Error("Expected issues");
}
expect(result.issues.length).toEqual(1);
expect(result.issues[0].path).toEqual([]);
} else
frontend/node_modules/zod/src/v3/tests/set.test.ts (Line 6:21 - Line 18:5), frontend/node_modules/zod/src/v4/classic/tests/set.test.ts (Line 2:9 - Line 14:13)
frontend/node_modules/zod/src/v3/tests/set.test.ts (Line 78:2 - Line 83:13), frontend/node_modules/zod/src/v4/classic/tests/map.test.ts (Line 55:2 - Line 59:15)
));
expect(result.success).toEqual(false);
if (result.success === false) {
expect(result.error.issues.length).toEqual(1);
expect(result.error.issues[0].code).toEqual(ZodIssueCode
frontend/node_modules/zod/src/v3/tests/set.test.ts (Line 88:11 - Line 97:41), frontend/node_modules/zod/src/v4/classic/tests/map.test.ts (Line 55:2 - Line 87:42)
]));
expect(result.success).toEqual(false);
if (result.success === false) {
expect(result.error.issues.length).toEqual(1);
expect(result.error.issues[0].code).toEqual(ZodIssueCode.too_small);
}
});
test("failing when set is bigger than max() "
frontend/node_modules/zod/src/v3/tests/set.test.ts (Line 98:8 - Line 103:8), frontend/node_modules/zod/src/v4/classic/tests/map.test.ts (Line 55:2 - Line 83:10)
]));
expect(result.success).toEqual(false);
if (result.success === false) {
expect(result.error.issues.length).toEqual(1);
expect(result.error.issues[0].code).toEqual(ZodIssueCode.too_big
frontend/node_modules/zod/src/v3/tests/set.test.ts (Line 105:1 - Line 115:3), frontend/node_modules/zod/src/v4/classic/tests/set.test.ts (Line 86:1 - Line 96:7)
});
test("doesn’t throw when an empty set is given", () => {
const result = stringSet.safeParse(new Set([]));
expect(result.success).toEqual(true);
});
test("throws when a Map is given", () => {
const result = stringSet.safeParse(new Map([]));
expect(result.success).toEqual(false);
if
frontend/node_modules/zod/src/v3/tests/set.test.ts (Line 122:2 - Line 127:7), frontend/node_modules/zod/src/v4/classic/tests/map.test.ts (Line 55:2 - Line 118:2)
]));
expect(result.success).toEqual(false);
if (result.success === false) {
expect(result.error.issues.length).toEqual(1);
expect(result.error.issues[0].code).toEqual(ZodIssueCode.invalid_type);
expect
frontend/node_modules/zod/src/v3/tests/refine.test.ts (Line 8:13 - Line 20:7), frontend/node_modules/zod/src/v4/classic/tests/refine.test.ts (Line 5:52 - Line 15:2)
, () => {
const obj1 = z.object({
first: z.string(),
second: z.string(),
});
const obj2 = obj1.partial().strict();
const obj3 = obj2.refine((data) => data.first || data.second, "Either first or second should be filled in.");
expect(obj1 === (obj2 as any)).toEqual(false);
expect(obj2 === (obj3 as any)).toEqual(false);
expect
frontend/node_modules/zod/src/v3/tests/refine.test.ts (Line 28:15 - Line 37:7), frontend/node_modules/zod/src/v4/classic/tests/refine.test.ts (Line 55:56 - Line 64:6)
, () => {
const validationSchema = z
.object({
email: z.string().email(),
password: z.string(),
confirmPassword: z.string(),
})
.refine((data) => data.password === data.confirmPassword, "Both password and confirmation must match");
expect
frontend/node_modules/zod/src/v3/tests/refine.test.ts (Line 60:21 - Line 72:6), frontend/node_modules/zod/src/v4/classic/tests/refine.test.ts (Line 78:44 - Line 90:39)
frontend/node_modules/zod/src/v3/tests/map.test.ts (Line 12:5 - Line 23:3), frontend/node_modules/zod/src/v4/classic/tests/map.test.ts (Line 8:2 - Line 19:7)
);
});
test("valid parse", () => {
const result = stringMap.safeParse(
new Map([
["first", "foo"],
["second", "bar"],
])
);
expect(result.success).toEqual(true);
if
frontend/node_modules/zod/src/v3/tests/map.test.ts (Line 20:5 - Line 26:4), frontend/node_modules/zod/src/v3/tests/set.test.ts (Line 22:9 - Line 27:4)
])
);
expect(result.success).toEqual(true);
if (result.success) {
expect(result.data.has("first")).toEqual(true);
expect(result.data.has("second")).toEqual(true);
expect(result.data.get
frontend/node_modules/zod/src/v3/tests/map.test.ts (Line 32:4 - Line 47:29), frontend/node_modules/zod/src/v3/tests/map.test.ts (Line 16:10 - Line 31:20)
(
new Map([
["first", "foo"],
["second", "bar"],
])
);
expect(result.success).toEqual(true);
if (result.success) {
expect(result.data.has("first")).toEqual(true);
expect(result.data.has("second")).toEqual(true);
expect(result.data.get("first")).toEqual("foo");
expect(result.data.get("second")).toEqual("bar");
}
});
test("throws when a Set is given"
frontend/node_modules/zod/src/v3/tests/map.test.ts (Line 45:1 - Line 56:62), frontend/node_modules/zod/src/v4/classic/tests/map.test.ts (Line 52:1 - Line 121:46)
});
test("throws when a Set is given", () => {
const result = stringMap.safeParse(new Set([]));
expect(result.success).toEqual(false);
if (result.success === false) {
expect(result.error.issues.length).toEqual(1);
expect(result.error.issues[0].code).toEqual(ZodIssueCode.invalid_type);
}
});
test("throws when the given map has invalid key and invalid input"
frontend/node_modules/zod/src/v3/tests/map.test.ts (Line 52:13 - Line 61:2), frontend/node_modules/zod/src/v4/classic/tests/map.test.ts (Line 59:15 - Line 68:2)
);
}
});
test("throws when the given map has invalid key and invalid input", () => {
const result = stringMap.safeParse(new Map([[42, Symbol()]]));
expect(result.success).toEqual(false);
if (result.success === false) {
expect(result.error.issues.length).toEqual(2);
expect(result.error.
frontend/node_modules/zod/src/v3/tests/map.test.ts (Line 57:2 - Line 62:2), frontend/node_modules/zod/src/v3/tests/set.test.ts (Line 132:2 - Line 138:2)
);
expect(result.success).toEqual(false);
if (result.success === false) {
expect(result.error.issues.length).toEqual(2);
expect(result.error.issues[0].code).toEqual(ZodIssueCode.invalid_type);
expect(result.error.issues[0].path).toEqual([0,
frontend/node_modules/zod/src/v3/tests/map.test.ts (Line 64:2 - Line 82:2), frontend/node_modules/zod/src/v4/classic/tests/map.test.ts (Line 87:6 - Line 105:2)
);
}
});
test("throws when the given map has multiple invalid entries", () => {
// const result = stringMap.safeParse(new Map([[42, Symbol()]]));
const result = stringMap.safeParse(
new Map([
[1, "foo"],
["bar", 2],
] as [any, any][]) as Map<any, any>
);
// const result = stringMap.safeParse(new Map([[42, Symbol()]]));
expect(result.success).toEqual(false);
if (result.success === false) {
expect(result.error.issues.length).toEqual(2);
expect(result.error.issues[
frontend/node_modules/zod/src/v3/tests/map.test.ts (Line 79:3 - Line 85:2), frontend/node_modules/zod/src/v3/tests/set.test.ts (Line 134:3 - Line 64:2)
frontend/node_modules/zod/src/v3/tests/error.test.ts (Line 499:1 - Line 528:55), frontend/node_modules/zod/src/v4/classic/tests/enum.test.ts (Line 249:1 - Line 278:26)
});
test("enum with message returns the custom error message", () => {
const schema = z.enum(["apple", "banana"], {
message: "the value provided is invalid",
});
const result1 = schema.safeParse("berries");
expect(result1.success).toEqual(false);
if (!result1.success) {
expect(result1.error.issues[0].message).toEqual("the value provided is invalid");
}
const result2 = schema.safeParse(undefined);
expect(result2.success).toEqual(false);
if (!result2.success) {
expect(result2.error.issues[0].message).toEqual("the value provided is invalid");
}
const result3 = schema.safeParse("banana");
expect(result3.success).toEqual(true);
const result4 = schema.safeParse(null);
expect(result4.success).toEqual(false);
if (!result4.success) {
expect(result4.error.issues[0].message).toEqual("the value provided is invalid");
}
});
test("when the message is falsy, it is used as is provided"
frontend/node_modules/zod/src/v3/tests/enum.test.ts (Line 17:5 - Line 28:5), frontend/node_modules/zod/src/v4/classic/tests/enum.test.ts (Line 85:6 - Line 96:13)
frontend/node_modules/zod/src/v3/tests/enum.test.ts (Line 35:2 - Line 42:18), frontend/node_modules/zod/src/v4/classic/tests/enum.test.ts (Line 104:2 - Line 112:18)
}).safeParse(undefined);
expect(result.success).toEqual(false);
if (!result.success) {
expect(result.error.issues[0].message).toEqual("REQUIRED");
}
});
test("extract/exclude"
frontend/node_modules/zod/src/v3/tests/enum.test.ts (Line 69:9 - Line 78:4), frontend/node_modules/zod/src/v4/classic/tests/enum.test.ts (Line 174:6 - Line 183:5)
: () => ({ message: "This is not healthy food!" }),
});
const unhealthyError = UnhealthyEnum.safeParse("Salad");
if (!unhealthyError.success) {
expect(unhealthyError.error.issues[0].message).toEqual("This is not healthy food!");
}
});
test("readonly in ZodEnumDef", () => {
let
frontend/node_modules/zod/src/v3/tests/discriminated-unions.test.ts (Line 6:8 - Line 17:57), frontend/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts (Line 32:23 - Line 43:49)
frontend/node_modules/zod/src/v3/tests/description.test.ts (Line 14:39 - Line 20:51), frontend/node_modules/zod/src/v4/classic/tests/description.test.ts (Line 13:12 - Line 19:43)
, () => {
expect(z.string().describe(description).description).toEqual(description);
expect(z.number().describe(description).description).toEqual(description);
expect(z.boolean().describe(description).description).toEqual(description);
});
test("description should carry over to chained schemas"
frontend/node_modules/zod/src/v3/tests/default.test.ts (Line 8:10 - Line 16:10), frontend/node_modules/zod/src/v4/classic/tests/default.test.ts (Line 11:10 - Line 19:10)
);
});
test("default with transform", () => {
const stringWithDefault = z
.string()
.transform((val) => val.toUpperCase())
.default("default");
expect(stringWithDefault.parse(undefined)).toBe("DEFAULT"
frontend/node_modules/zod/src/v3/tests/default.test.ts (Line 24:5 - Line 31:5), frontend/node_modules/zod/src/v4/classic/tests/default.test.ts (Line 28:2 - Line 35:7)
frontend/node_modules/zod/src/v3/tests/all-errors.test.ts (Line 1:1 - Line 13:5), frontend/node_modules/zod/src/v3/tests/object.test.ts (Line 1:1 - Line 12:5)
// @ts-ignore TS6133
import { expect, test } from "vitest";
import * as z from "zod/v3";
import { util } from "../helpers/util.js";
const Test = z.object({
f1: z.number(),
f2: z.string().optional(),
f3: z.string().nullable(),
f4: z.array(z.object({ t: z.union([z.string(), z.boolean()]) })),
});
type
frontend/node_modules/zod/src/v3/tests/all-errors.test.ts (Line 40:29 - Line 47:2), frontend/node_modules/zod/src/v3/tests/all-errors.test.ts (Line 16:42 - Line 23:5)
frontend/node_modules/@tanstack/query-core/build/modern/thenable.d.cts (Line 1:1 - Line 47:2), frontend/node_modules/@tanstack/query-core/build/modern/thenable.d.ts (Line 1:1 - Line 47:2)
/**
* Thenable types which matches React's types for promises
*
* React seemingly uses `.status`, `.value` and `.reason` properties on a promises to optimistically unwrap data from promises
*
* @see https://github.com/facebook/react/blob/main/packages/shared/ReactTypes.js#L112-L138
* @see https://github.com/facebook/react/blob/4f604941569d2e8947ce1460a0b2997e835f37b9/packages/react-debug-tools/src/ReactDebugHooks.js#L224-L227
*/
interface Fulfilled<T> {
status: 'fulfilled';
value: T;
}
interface Rejected {
status: 'rejected';
reason: unknown;
}
interface Pending<T> {
status: 'pending';
/**
* Resolve the promise with a value.
* Will remove the `resolve` and `reject` properties from the promise.
*/
resolve: (value: T) => void;
/**
* Reject the promise with a reason.
* Will remove the `resolve` and `reject` properties from the promise.
*/
reject: (reason: unknown) => void;
}
type FulfilledThenable<T> = Promise<T> & Fulfilled<T>;
type RejectedThenable<T> = Promise<T> & Rejected;
type PendingThenable<T> = Promise<T> & Pending<T>;
type Thenable<T> = FulfilledThenable<T> | RejectedThenable<T> | PendingThenable<T>;
declare function pendingThenable<T>(): PendingThenable<T>;
/**
* This function takes a Promise-like input and detects whether the data
* is synchronously available or not.
*
* It does not inspect .status, .value or .reason properties of the promise,
* as those are not always available, and the .status of React's promises
* should not be considered part of the public API.
*/
declare function tryResolveSync(promise: Promise<unknown> | Thenable<unknown>): {
data: {} | null;
} | undefined;
export { type FulfilledThenable, type PendingThenable, type RejectedThenable, type Thenable, pendingThenable, tryResolveSync };
frontend/node_modules/@tanstack/query-core/build/modern/subscribable.d.cts (Line 1:1 - Line 10:2), frontend/node_modules/@tanstack/query-core/build/modern/subscribable.d.ts (Line 1:1 - Line 10:2)
frontend/node_modules/@tanstack/query-core/build/modern/streamedQuery.d.cts (Line 3:21 - Line 26:2), frontend/node_modules/@tanstack/query-core/build/modern/streamedQuery.d.ts (Line 3:20 - Line 26:2)
;
/**
* This is a helper function to create a query function that streams data from an AsyncIterable.
* Data will be an Array of all the chunks received.
* The query will be in a 'pending' state until the first chunk of data is received, but will go to 'success' after that.
* The query will stay in fetchStatus 'fetching' until the stream ends.
* @param queryFn - The function that returns an AsyncIterable to stream data from.
* @param refetchMode - Defines how re-fetches are handled.
* Defaults to `'reset'`, erases all data and puts the query back into `pending` state.
* Set to `'append'` to append new data to the existing data.
* Set to `'replace'` to write all data to the cache once the stream ends.
* @param maxChunks - The maximum number of chunks to keep in the cache.
* Defaults to `undefined`, meaning all chunks will be kept.
* If `undefined` or `0`, the number of chunks is unlimited.
* If the number of chunks exceeds this number, the oldest chunk will be removed.
*/
declare function streamedQuery<TQueryFnData = unknown, TQueryKey extends QueryKey = QueryKey>({ queryFn, refetchMode, maxChunks, }: {
queryFn: (context: QueryFunctionContext<TQueryKey>) => AsyncIterable<TQueryFnData> | Promise<AsyncIterable<TQueryFnData>>;
refetchMode?: 'append' | 'reset' | 'replace';
maxChunks?: number;
}): QueryFunction<Array<TQueryFnData>, TQueryKey>;
export { streamedQuery };
frontend/node_modules/@tanstack/query-core/build/modern/removable.d.cts (Line 1:1 - Line 11:2), frontend/node_modules/@tanstack/query-core/build/modern/removable.d.ts (Line 1:1 - Line 11:2)
frontend/node_modules/@tanstack/query-core/build/modern/notifyManager.d.ts (Line 26:14 - Line 46:7), frontend/node_modules/@tanstack/query-core/build/modern/notifyManager.d.ts (Line 7:2 - Line 26:8)
: {
readonly batch: <T>(callback: () => T) => T;
/**
* All calls to the wrapped function will be batched.
*/
readonly batchCalls: <T extends Array<unknown>>(callback: BatchCallsCallback<T>) => BatchCallsCallback<T>;
readonly schedule: (callback: NotifyCallback) => void;
/**
* Use this method to set a custom notify function.
* This can be used to for example wrap notifications with `React.act` while running tests.
*/
readonly setNotifyFunction: (fn: NotifyFunction) => void;
/**
* Use this method to set a custom function to batch notifications together into a single tick.
* By default React Query will use the batch function provided by ReactDOM or React Native.
*/
readonly setBatchNotifyFunction: (fn: BatchNotifyFunction) => void;
readonly setScheduler: (fn: ScheduleFunction) => void;
};
export
frontend/node_modules/@tanstack/query-core/build/modern/notifyManager.d.cts (Line 1:1 - Line 46:2), frontend/node_modules/@tanstack/query-core/build/modern/notifyManager.d.ts (Line 1:1 - Line 46:2)
type NotifyCallback = () => void;
type NotifyFunction = (callback: () => void) => void;
type BatchNotifyFunction = (callback: () => void) => void;
type BatchCallsCallback<T extends Array<unknown>> = (...args: T) => void;
type ScheduleFunction = (callback: () => void) => void;
declare const defaultScheduler: ScheduleFunction;
declare function createNotifyManager(): {
readonly batch: <T>(callback: () => T) => T;
/**
* All calls to the wrapped function will be batched.
*/
readonly batchCalls: <T extends Array<unknown>>(callback: BatchCallsCallback<T>) => BatchCallsCallback<T>;
readonly schedule: (callback: NotifyCallback) => void;
/**
* Use this method to set a custom notify function.
* This can be used to for example wrap notifications with `React.act` while running tests.
*/
readonly setNotifyFunction: (fn: NotifyFunction) => void;
/**
* Use this method to set a custom function to batch notifications together into a single tick.
* By default React Query will use the batch function provided by ReactDOM or React Native.
*/
readonly setBatchNotifyFunction: (fn: BatchNotifyFunction) => void;
readonly setScheduler: (fn: ScheduleFunction) => void;
};
declare const notifyManager: {
readonly batch: <T>(callback: () => T) => T;
/**
* All calls to the wrapped function will be batched.
*/
readonly batchCalls: <T extends Array<unknown>>(callback: BatchCallsCallback<T>) => BatchCallsCallback<T>;
readonly schedule: (callback: NotifyCallback) => void;
/**
* Use this method to set a custom notify function.
* This can be used to for example wrap notifications with `React.act` while running tests.
*/
readonly setNotifyFunction: (fn: NotifyFunction) => void;
/**
* Use this method to set a custom function to batch notifications together into a single tick.
* By default React Query will use the batch function provided by ReactDOM or React Native.
*/
readonly setBatchNotifyFunction: (fn: BatchNotifyFunction) => void;
readonly setScheduler: (fn: ScheduleFunction) => void;
};
export { createNotifyManager, defaultScheduler, notifyManager };
frontend/node_modules/@tanstack/query-core/build/modern/infiniteQueryObserver.d.cts (Line 3:18 - Line 20:2), frontend/node_modules/@tanstack/query-core/build/modern/infiniteQueryObserver.d.ts (Line 3:17 - Line 20:2)
frontend/node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.d.cts (Line 3:21 - Line 15:2), frontend/node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.d.ts (Line 3:20 - Line 15:2)
;
declare function infiniteQueryBehavior<TQueryFnData, TError, TData, TPageParam>(pages?: number): QueryBehavior<TQueryFnData, TError, InfiniteData<TData, TPageParam>>;
/**
* Checks if there is a next page.
*/
declare function hasNextPage(options: InfiniteQueryPageParamsOptions<any, any>, data?: InfiniteData<unknown>): boolean;
/**
* Checks if there is a previous page.
*/
declare function hasPreviousPage(options: InfiniteQueryPageParamsOptions<any, any>, data?: InfiniteData<unknown>): boolean;
export { hasNextPage, hasPreviousPage, infiniteQueryBehavior };
frontend/node_modules/@tanstack/query-core/build/modern/focusManager.d.cts (Line 1:21 - Line 17:2), frontend/node_modules/@tanstack/query-core/build/modern/focusManager.d.ts (Line 1:20 - Line 17:2)
frontend/node_modules/@tanstack/query-core/build/legacy/thenable.d.ts (Line 1:1 - Line 47:2), frontend/node_modules/@tanstack/query-core/build/modern/thenable.d.ts (Line 1:1 - Line 47:2)
/**
* Thenable types which matches React's types for promises
*
* React seemingly uses `.status`, `.value` and `.reason` properties on a promises to optimistically unwrap data from promises
*
* @see https://github.com/facebook/react/blob/main/packages/shared/ReactTypes.js#L112-L138
* @see https://github.com/facebook/react/blob/4f604941569d2e8947ce1460a0b2997e835f37b9/packages/react-debug-tools/src/ReactDebugHooks.js#L224-L227
*/
interface Fulfilled<T> {
status: 'fulfilled';
value: T;
}
interface Rejected {
status: 'rejected';
reason: unknown;
}
interface Pending<T> {
status: 'pending';
/**
* Resolve the promise with a value.
* Will remove the `resolve` and `reject` properties from the promise.
*/
resolve: (value: T) => void;
/**
* Reject the promise with a reason.
* Will remove the `resolve` and `reject` properties from the promise.
*/
reject: (reason: unknown) => void;
}
type FulfilledThenable<T> = Promise<T> & Fulfilled<T>;
type RejectedThenable<T> = Promise<T> & Rejected;
type PendingThenable<T> = Promise<T> & Pending<T>;
type Thenable<T> = FulfilledThenable<T> | RejectedThenable<T> | PendingThenable<T>;
declare function pendingThenable<T>(): PendingThenable<T>;
/**
* This function takes a Promise-like input and detects whether the data
* is synchronously available or not.
*
* It does not inspect .status, .value or .reason properties of the promise,
* as those are not always available, and the .status of React's promises
* should not be considered part of the public API.
*/
declare function tryResolveSync(promise: Promise<unknown> | Thenable<unknown>): {
data: {} | null;
} | undefined;
export { type FulfilledThenable, type PendingThenable, type RejectedThenable, type Thenable, pendingThenable, tryResolveSync };
frontend/node_modules/@tanstack/query-core/build/legacy/thenable.d.cts (Line 1:1 - Line 47:2), frontend/node_modules/@tanstack/query-core/build/modern/thenable.d.ts (Line 1:1 - Line 47:2)
/**
* Thenable types which matches React's types for promises
*
* React seemingly uses `.status`, `.value` and `.reason` properties on a promises to optimistically unwrap data from promises
*
* @see https://github.com/facebook/react/blob/main/packages/shared/ReactTypes.js#L112-L138
* @see https://github.com/facebook/react/blob/4f604941569d2e8947ce1460a0b2997e835f37b9/packages/react-debug-tools/src/ReactDebugHooks.js#L224-L227
*/
interface Fulfilled<T> {
status: 'fulfilled';
value: T;
}
interface Rejected {
status: 'rejected';
reason: unknown;
}
interface Pending<T> {
status: 'pending';
/**
* Resolve the promise with a value.
* Will remove the `resolve` and `reject` properties from the promise.
*/
resolve: (value: T) => void;
/**
* Reject the promise with a reason.
* Will remove the `resolve` and `reject` properties from the promise.
*/
reject: (reason: unknown) => void;
}
type FulfilledThenable<T> = Promise<T> & Fulfilled<T>;
type RejectedThenable<T> = Promise<T> & Rejected;
type PendingThenable<T> = Promise<T> & Pending<T>;
type Thenable<T> = FulfilledThenable<T> | RejectedThenable<T> | PendingThenable<T>;
declare function pendingThenable<T>(): PendingThenable<T>;
/**
* This function takes a Promise-like input and detects whether the data
* is synchronously available or not.
*
* It does not inspect .status, .value or .reason properties of the promise,
* as those are not always available, and the .status of React's promises
* should not be considered part of the public API.
*/
declare function tryResolveSync(promise: Promise<unknown> | Thenable<unknown>): {
data: {} | null;
} | undefined;
export { type FulfilledThenable, type PendingThenable, type RejectedThenable, type Thenable, pendingThenable, tryResolveSync };
frontend/node_modules/@tanstack/query-core/build/legacy/subscribable.d.ts (Line 1:1 - Line 10:2), frontend/node_modules/@tanstack/query-core/build/modern/subscribable.d.ts (Line 1:1 - Line 10:2)
frontend/node_modules/@tanstack/query-core/build/legacy/streamedQuery.d.ts (Line 1:1 - Line 26:2), frontend/node_modules/@tanstack/query-core/build/modern/streamedQuery.d.ts (Line 1:1 - Line 26:2)
import { I as QueryKey, a1 as QueryFunctionContext, Y as QueryFunction } from './hydration-Cvr-9VdO.js';
import './removable.js';
import './subscribable.js';
/**
* This is a helper function to create a query function that streams data from an AsyncIterable.
* Data will be an Array of all the chunks received.
* The query will be in a 'pending' state until the first chunk of data is received, but will go to 'success' after that.
* The query will stay in fetchStatus 'fetching' until the stream ends.
* @param queryFn - The function that returns an AsyncIterable to stream data from.
* @param refetchMode - Defines how re-fetches are handled.
* Defaults to `'reset'`, erases all data and puts the query back into `pending` state.
* Set to `'append'` to append new data to the existing data.
* Set to `'replace'` to write all data to the cache once the stream ends.
* @param maxChunks - The maximum number of chunks to keep in the cache.
* Defaults to `undefined`, meaning all chunks will be kept.
* If `undefined` or `0`, the number of chunks is unlimited.
* If the number of chunks exceeds this number, the oldest chunk will be removed.
*/
declare function streamedQuery<TQueryFnData = unknown, TQueryKey extends QueryKey = QueryKey>({ queryFn, refetchMode, maxChunks, }: {
queryFn: (context: QueryFunctionContext<TQueryKey>) => AsyncIterable<TQueryFnData> | Promise<AsyncIterable<TQueryFnData>>;
refetchMode?: 'append' | 'reset' | 'replace';
maxChunks?: number;
}): QueryFunction<Array<TQueryFnData>, TQueryKey>;
export { streamedQuery };
frontend/node_modules/@tanstack/query-core/build/legacy/streamedQuery.d.cts (Line 1:1 - Line 26:2), frontend/node_modules/@tanstack/query-core/build/modern/streamedQuery.d.cts (Line 1:1 - Line 26:2)
import { I as QueryKey, a1 as QueryFunctionContext, Y as QueryFunction } from './hydration-CADtEOkK.cjs';
import './removable.cjs';
import './subscribable.cjs';
/**
* This is a helper function to create a query function that streams data from an AsyncIterable.
* Data will be an Array of all the chunks received.
* The query will be in a 'pending' state until the first chunk of data is received, but will go to 'success' after that.
* The query will stay in fetchStatus 'fetching' until the stream ends.
* @param queryFn - The function that returns an AsyncIterable to stream data from.
* @param refetchMode - Defines how re-fetches are handled.
* Defaults to `'reset'`, erases all data and puts the query back into `pending` state.
* Set to `'append'` to append new data to the existing data.
* Set to `'replace'` to write all data to the cache once the stream ends.
* @param maxChunks - The maximum number of chunks to keep in the cache.
* Defaults to `undefined`, meaning all chunks will be kept.
* If `undefined` or `0`, the number of chunks is unlimited.
* If the number of chunks exceeds this number, the oldest chunk will be removed.
*/
declare function streamedQuery<TQueryFnData = unknown, TQueryKey extends QueryKey = QueryKey>({ queryFn, refetchMode, maxChunks, }: {
queryFn: (context: QueryFunctionContext<TQueryKey>) => AsyncIterable<TQueryFnData> | Promise<AsyncIterable<TQueryFnData>>;
refetchMode?: 'append' | 'reset' | 'replace';
maxChunks?: number;
}): QueryFunction<Array<TQueryFnData>, TQueryKey>;
export { streamedQuery };
frontend/node_modules/@tanstack/query-core/build/legacy/removable.d.ts (Line 1:1 - Line 11:2), frontend/node_modules/@tanstack/query-core/build/modern/removable.d.ts (Line 1:1 - Line 11:2)
frontend/node_modules/@tanstack/query-core/build/legacy/notifyManager.d.ts (Line 1:1 - Line 46:2), frontend/node_modules/@tanstack/query-core/build/modern/notifyManager.d.ts (Line 1:1 - Line 46:2)
type NotifyCallback = () => void;
type NotifyFunction = (callback: () => void) => void;
type BatchNotifyFunction = (callback: () => void) => void;
type BatchCallsCallback<T extends Array<unknown>> = (...args: T) => void;
type ScheduleFunction = (callback: () => void) => void;
declare const defaultScheduler: ScheduleFunction;
declare function createNotifyManager(): {
readonly batch: <T>(callback: () => T) => T;
/**
* All calls to the wrapped function will be batched.
*/
readonly batchCalls: <T extends Array<unknown>>(callback: BatchCallsCallback<T>) => BatchCallsCallback<T>;
readonly schedule: (callback: NotifyCallback) => void;
/**
* Use this method to set a custom notify function.
* This can be used to for example wrap notifications with `React.act` while running tests.
*/
readonly setNotifyFunction: (fn: NotifyFunction) => void;
/**
* Use this method to set a custom function to batch notifications together into a single tick.
* By default React Query will use the batch function provided by ReactDOM or React Native.
*/
readonly setBatchNotifyFunction: (fn: BatchNotifyFunction) => void;
readonly setScheduler: (fn: ScheduleFunction) => void;
};
declare const notifyManager: {
readonly batch: <T>(callback: () => T) => T;
/**
* All calls to the wrapped function will be batched.
*/
readonly batchCalls: <T extends Array<unknown>>(callback: BatchCallsCallback<T>) => BatchCallsCallback<T>;
readonly schedule: (callback: NotifyCallback) => void;
/**
* Use this method to set a custom notify function.
* This can be used to for example wrap notifications with `React.act` while running tests.
*/
readonly setNotifyFunction: (fn: NotifyFunction) => void;
/**
* Use this method to set a custom function to batch notifications together into a single tick.
* By default React Query will use the batch function provided by ReactDOM or React Native.
*/
readonly setBatchNotifyFunction: (fn: BatchNotifyFunction) => void;
readonly setScheduler: (fn: ScheduleFunction) => void;
};
export { createNotifyManager, defaultScheduler, notifyManager };
frontend/node_modules/@tanstack/query-core/build/legacy/notifyManager.d.cts (Line 1:1 - Line 46:2), frontend/node_modules/@tanstack/query-core/build/modern/notifyManager.d.ts (Line 1:1 - Line 46:2)
type NotifyCallback = () => void;
type NotifyFunction = (callback: () => void) => void;
type BatchNotifyFunction = (callback: () => void) => void;
type BatchCallsCallback<T extends Array<unknown>> = (...args: T) => void;
type ScheduleFunction = (callback: () => void) => void;
declare const defaultScheduler: ScheduleFunction;
declare function createNotifyManager(): {
readonly batch: <T>(callback: () => T) => T;
/**
* All calls to the wrapped function will be batched.
*/
readonly batchCalls: <T extends Array<unknown>>(callback: BatchCallsCallback<T>) => BatchCallsCallback<T>;
readonly schedule: (callback: NotifyCallback) => void;
/**
* Use this method to set a custom notify function.
* This can be used to for example wrap notifications with `React.act` while running tests.
*/
readonly setNotifyFunction: (fn: NotifyFunction) => void;
/**
* Use this method to set a custom function to batch notifications together into a single tick.
* By default React Query will use the batch function provided by ReactDOM or React Native.
*/
readonly setBatchNotifyFunction: (fn: BatchNotifyFunction) => void;
readonly setScheduler: (fn: ScheduleFunction) => void;
};
declare const notifyManager: {
readonly batch: <T>(callback: () => T) => T;
/**
* All calls to the wrapped function will be batched.
*/
readonly batchCalls: <T extends Array<unknown>>(callback: BatchCallsCallback<T>) => BatchCallsCallback<T>;
readonly schedule: (callback: NotifyCallback) => void;
/**
* Use this method to set a custom notify function.
* This can be used to for example wrap notifications with `React.act` while running tests.
*/
readonly setNotifyFunction: (fn: NotifyFunction) => void;
/**
* Use this method to set a custom function to batch notifications together into a single tick.
* By default React Query will use the batch function provided by ReactDOM or React Native.
*/
readonly setBatchNotifyFunction: (fn: BatchNotifyFunction) => void;
readonly setScheduler: (fn: ScheduleFunction) => void;
};
export { createNotifyManager, defaultScheduler, notifyManager };
frontend/node_modules/@tanstack/query-core/build/legacy/infiniteQueryObserver.d.ts (Line 1:1 - Line 20:2), frontend/node_modules/@tanstack/query-core/build/modern/infiniteQueryObserver.d.ts (Line 1:1 - Line 20:2)
import { G as DefaultError, a8 as InfiniteData, I as QueryKey, c as QueryObserver, aQ as InfiniteQueryObserverResult, b as QueryClient, aj as InfiniteQueryObserverOptions, ak as DefaultedInfiniteQueryObserverOptions, av as FetchNextPageOptions, aw as FetchPreviousPageOptions, x as Query } from './hydration-Cvr-9VdO.js';
import { Subscribable } from './subscribable.js';
import './removable.js';
type InfiniteQueryObserverListener<TData, TError> = (result: InfiniteQueryObserverResult<TData, TError>) => void;
declare class InfiniteQueryObserver<TQueryFnData = unknown, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown> extends QueryObserver<TQueryFnData, TError, TData, InfiniteData<TQueryFnData, TPageParam>, TQueryKey> {
subscribe: Subscribable<InfiniteQueryObserverListener<TData, TError>>['subscribe'];
getCurrentResult: ReplaceReturnType<QueryObserver<TQueryFnData, TError, TData, InfiniteData<TQueryFnData, TPageParam>, TQueryKey>['getCurrentResult'], InfiniteQueryObserverResult<TData, TError>>;
protected fetch: ReplaceReturnType<QueryObserver<TQueryFnData, TError, TData, InfiniteData<TQueryFnData, TPageParam>, TQueryKey>['fetch'], Promise<InfiniteQueryObserverResult<TData, TError>>>;
constructor(client: QueryClient, options: InfiniteQueryObserverOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>);
protected bindMethods(): void;
setOptions(options: InfiniteQueryObserverOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>): void;
getOptimisticResult(options: DefaultedInfiniteQueryObserverOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>): InfiniteQueryObserverResult<TData, TError>;
fetchNextPage(options?: FetchNextPageOptions): Promise<InfiniteQueryObserverResult<TData, TError>>;
fetchPreviousPage(options?: FetchPreviousPageOptions): Promise<InfiniteQueryObserverResult<TData, TError>>;
protected createResult(query: Query<TQueryFnData, TError, InfiniteData<TQueryFnData, TPageParam>, TQueryKey>, options: InfiniteQueryObserverOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>): InfiniteQueryObserverResult<TData, TError>;
}
type ReplaceReturnType<TFunction extends (...args: Array<any>) => unknown, TReturn> = (...args: Parameters<TFunction>) => TReturn;
export { InfiniteQueryObserver };
frontend/node_modules/@tanstack/query-core/build/legacy/infiniteQueryObserver.d.cts (Line 1:1 - Line 20:2), frontend/node_modules/@tanstack/query-core/build/modern/infiniteQueryObserver.d.cts (Line 1:1 - Line 20:2)
import { G as DefaultError, a8 as InfiniteData, I as QueryKey, c as QueryObserver, aQ as InfiniteQueryObserverResult, b as QueryClient, aj as InfiniteQueryObserverOptions, ak as DefaultedInfiniteQueryObserverOptions, av as FetchNextPageOptions, aw as FetchPreviousPageOptions, x as Query } from './hydration-CADtEOkK.cjs';
import { Subscribable } from './subscribable.cjs';
import './removable.cjs';
type InfiniteQueryObserverListener<TData, TError> = (result: InfiniteQueryObserverResult<TData, TError>) => void;
declare class InfiniteQueryObserver<TQueryFnData = unknown, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown> extends QueryObserver<TQueryFnData, TError, TData, InfiniteData<TQueryFnData, TPageParam>, TQueryKey> {
subscribe: Subscribable<InfiniteQueryObserverListener<TData, TError>>['subscribe'];
getCurrentResult: ReplaceReturnType<QueryObserver<TQueryFnData, TError, TData, InfiniteData<TQueryFnData, TPageParam>, TQueryKey>['getCurrentResult'], InfiniteQueryObserverResult<TData, TError>>;
protected fetch: ReplaceReturnType<QueryObserver<TQueryFnData, TError, TData, InfiniteData<TQueryFnData, TPageParam>, TQueryKey>['fetch'], Promise<InfiniteQueryObserverResult<TData, TError>>>;
constructor(client: QueryClient, options: InfiniteQueryObserverOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>);
protected bindMethods(): void;
setOptions(options: InfiniteQueryObserverOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>): void;
getOptimisticResult(options: DefaultedInfiniteQueryObserverOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>): InfiniteQueryObserverResult<TData, TError>;
fetchNextPage(options?: FetchNextPageOptions): Promise<InfiniteQueryObserverResult<TData, TError>>;
fetchPreviousPage(options?: FetchPreviousPageOptions): Promise<InfiniteQueryObserverResult<TData, TError>>;
protected createResult(query: Query<TQueryFnData, TError, InfiniteData<TQueryFnData, TPageParam>, TQueryKey>, options: InfiniteQueryObserverOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>): InfiniteQueryObserverResult<TData, TError>;
}
type ReplaceReturnType<TFunction extends (...args: Array<any>) => unknown, TReturn> = (...args: Parameters<TFunction>) => TReturn;
export { InfiniteQueryObserver };
frontend/node_modules/@tanstack/query-core/build/legacy/infiniteQueryBehavior.d.ts (Line 1:1 - Line 15:2), frontend/node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.d.ts (Line 1:1 - Line 15:2)
import { ba as QueryBehavior, a8 as InfiniteData, ae as InfiniteQueryPageParamsOptions } from './hydration-Cvr-9VdO.js';
import './removable.js';
import './subscribable.js';
declare function infiniteQueryBehavior<TQueryFnData, TError, TData, TPageParam>(pages?: number): QueryBehavior<TQueryFnData, TError, InfiniteData<TData, TPageParam>>;
/**
* Checks if there is a next page.
*/
declare function hasNextPage(options: InfiniteQueryPageParamsOptions<any, any>, data?: InfiniteData<unknown>): boolean;
/**
* Checks if there is a previous page.
*/
declare function hasPreviousPage(options: InfiniteQueryPageParamsOptions<any, any>, data?: InfiniteData<unknown>): boolean;
export { hasNextPage, hasPreviousPage, infiniteQueryBehavior };
frontend/node_modules/@tanstack/query-core/build/legacy/infiniteQueryBehavior.d.cts (Line 1:1 - Line 15:2), frontend/node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.d.cts (Line 1:1 - Line 15:2)
import { ba as QueryBehavior, a8 as InfiniteData, ae as InfiniteQueryPageParamsOptions } from './hydration-CADtEOkK.cjs';
import './removable.cjs';
import './subscribable.cjs';
declare function infiniteQueryBehavior<TQueryFnData, TError, TData, TPageParam>(pages?: number): QueryBehavior<TQueryFnData, TError, InfiniteData<TData, TPageParam>>;
/**
* Checks if there is a next page.
*/
declare function hasNextPage(options: InfiniteQueryPageParamsOptions<any, any>, data?: InfiniteData<unknown>): boolean;
/**
* Checks if there is a previous page.
*/
declare function hasPreviousPage(options: InfiniteQueryPageParamsOptions<any, any>, data?: InfiniteData<unknown>): boolean;
export { hasNextPage, hasPreviousPage, infiniteQueryBehavior };
frontend/node_modules/@tanstack/query-core/build/legacy/index.d.ts (Line 1:1 - Line 9:2), frontend/node_modules/@tanstack/query-core/build/modern/index.d.ts (Line 1:1 - Line 9:2)
export { T as AnyDataTag, b6 as CancelOptions, C as CancelledError, V as DataTag, G as DefaultError, b5 as DefaultOptions, ak as DefaultedInfiniteQueryObserverOptions, ai as DefaultedQueryObserverOptions, aP as DefinedInfiniteQueryObserverResult, aG as DefinedQueryObserverResult, D as DehydrateOptions, A as DehydratedState, B as DistributiveOmit, $ as Enabled, an as EnsureInfiniteQueryDataOptions, am as EnsureQueryDataOptions, ao as FetchInfiniteQueryOptions, av as FetchNextPageOptions, aw as FetchPreviousPageOptions, al as FetchQueryOptions, ay as FetchStatus, a7 as GetNextPageParamFunction, a6 as GetPreviousPageParamFunction, H as HydrateOptions, W as InferDataFromTag, X as InferErrorFromTag, a8 as InfiniteData, aI as InfiniteQueryObserverBaseResult, aL as InfiniteQueryObserverLoadingErrorResult, aK as InfiniteQueryObserverLoadingResult, aj as InfiniteQueryObserverOptions, aJ as InfiniteQueryObserverPendingResult, aO as InfiniteQueryObserverPlaceholderResult, aM as InfiniteQueryObserverRefetchErrorResult, aQ as InfiniteQueryObserverResult, aN as InfiniteQueryObserverSuccessResult, ae as InfiniteQueryPageParamsOptions, a2 as InitialDataFunction, ad as InitialPageParam, at as InvalidateOptions, ar as InvalidateQueryFilters, aZ as MutateFunction, aY as MutateOptions, z as Mutation, M as MutationCache, d as MutationCacheNotifyEvent, j as MutationFilters, aV as MutationFunction, aR as MutationKey, aU as MutationMeta, e as MutationObserver, a_ as MutationObserverBaseResult, b1 as MutationObserverErrorResult, a$ as MutationObserverIdleResult, b0 as MutationObserverLoadingResult, aX as MutationObserverOptions, b3 as MutationObserverResult, b2 as MutationObserverSuccessResult, aW as MutationOptions, aT as MutationScope, y as MutationState, aS as MutationStatus, aa as NetworkMode, F as NoInfer, N as NonUndefinedGuard, b9 as NotifyEvent, b8 as NotifyEventType, ab as NotifyOnChangeProps, O as OmitKeyof, E as Override, a3 as PlaceholderDataFunction, a4 as QueriesPlaceholderDataFunction, x as Query, Q as QueryCache, a as QueryCacheNotifyEvent, b as QueryClient, b4 as QueryClientConfig, l as QueryFilters, Y as QueryFunction, a1 as QueryFunctionContext, I as QueryKey, a5 as QueryKeyHashFunction, a9 as QueryMeta, c as QueryObserver, az as QueryObserverBaseResult, aC as QueryObserverLoadingErrorResult, aB as QueryObserverLoadingResult, ag as QueryObserverOptions, aA as QueryObserverPendingResult, aF as QueryObserverPlaceholderResult, aD as QueryObserverRefetchErrorResult, aH as QueryObserverResult, aE as QueryObserverSuccessResult, ac as QueryOptions, a0 as QueryPersister, w as QueryState, ax as QueryStatus, aq as RefetchOptions, as as RefetchQueryFilters, R as Register, au as ResetOptions, ap as ResultOptions, b7 as SetDataOptions, S as SkipToken, Z as StaleTime, _ as StaleTimeFunction, af as ThrowOnError, P as UnsetMarker, U as Updater, ah as WithRequired, K as dataTagErrorSymbol, J as dataTagSymbol, v as defaultShouldDehydrateMutation, u as defaultShouldDehydrateQuery, q as dehydrate, h as hashKey, t as hydrate, o as isCancelledError, i as isServer, k as keepPreviousData, f as matchMutation, m as matchQuery, n as noop, p as partialMatchKey, r as replaceEqualDeep, g as shouldThrowError, s as skipToken, L as unsetMarker } from './hydration-Cvr-9VdO.js';
export { QueriesObserver, QueriesObserverOptions } from './queriesObserver.js';
export { InfiniteQueryObserver } from './infiniteQueryObserver.js';
export { defaultScheduler, notifyManager } from './notifyManager.js';
export { focusManager } from './focusManager.js';
export { onlineManager } from './onlineManager.js';
export { streamedQuery as experimental_streamedQuery } from './streamedQuery.js';
import './removable.js';
import './subscribable.js';
frontend/node_modules/@tanstack/query-core/build/legacy/index.d.cts (Line 1:1 - Line 9:2), frontend/node_modules/@tanstack/query-core/build/modern/index.d.ts (Line 1:1 - Line 9:2)
export { T as AnyDataTag, b6 as CancelOptions, C as CancelledError, V as DataTag, G as DefaultError, b5 as DefaultOptions, ak as DefaultedInfiniteQueryObserverOptions, ai as DefaultedQueryObserverOptions, aP as DefinedInfiniteQueryObserverResult, aG as DefinedQueryObserverResult, D as DehydrateOptions, A as DehydratedState, B as DistributiveOmit, $ as Enabled, an as EnsureInfiniteQueryDataOptions, am as EnsureQueryDataOptions, ao as FetchInfiniteQueryOptions, av as FetchNextPageOptions, aw as FetchPreviousPageOptions, al as FetchQueryOptions, ay as FetchStatus, a7 as GetNextPageParamFunction, a6 as GetPreviousPageParamFunction, H as HydrateOptions, W as InferDataFromTag, X as InferErrorFromTag, a8 as InfiniteData, aI as InfiniteQueryObserverBaseResult, aL as InfiniteQueryObserverLoadingErrorResult, aK as InfiniteQueryObserverLoadingResult, aj as InfiniteQueryObserverOptions, aJ as InfiniteQueryObserverPendingResult, aO as InfiniteQueryObserverPlaceholderResult, aM as InfiniteQueryObserverRefetchErrorResult, aQ as InfiniteQueryObserverResult, aN as InfiniteQueryObserverSuccessResult, ae as InfiniteQueryPageParamsOptions, a2 as InitialDataFunction, ad as InitialPageParam, at as InvalidateOptions, ar as InvalidateQueryFilters, aZ as MutateFunction, aY as MutateOptions, z as Mutation, M as MutationCache, d as MutationCacheNotifyEvent, j as MutationFilters, aV as MutationFunction, aR as MutationKey, aU as MutationMeta, e as MutationObserver, a_ as MutationObserverBaseResult, b1 as MutationObserverErrorResult, a$ as MutationObserverIdleResult, b0 as MutationObserverLoadingResult, aX as MutationObserverOptions, b3 as MutationObserverResult, b2 as MutationObserverSuccessResult, aW as MutationOptions, aT as MutationScope, y as MutationState, aS as MutationStatus, aa as NetworkMode, F as NoInfer, N as NonUndefinedGuard, b9 as NotifyEvent, b8 as NotifyEventType, ab as NotifyOnChangeProps, O as OmitKeyof, E as Override, a3 as PlaceholderDataFunction, a4 as QueriesPlaceholderDataFunction, x as Query, Q as QueryCache, a as QueryCacheNotifyEvent, b as QueryClient, b4 as QueryClientConfig, l as QueryFilters, Y as QueryFunction, a1 as QueryFunctionContext, I as QueryKey, a5 as QueryKeyHashFunction, a9 as QueryMeta, c as QueryObserver, az as QueryObserverBaseResult, aC as QueryObserverLoadingErrorResult, aB as QueryObserverLoadingResult, ag as QueryObserverOptions, aA as QueryObserverPendingResult, aF as QueryObserverPlaceholderResult, aD as QueryObserverRefetchErrorResult, aH as QueryObserverResult, aE as QueryObserverSuccessResult, ac as QueryOptions, a0 as QueryPersister, w as QueryState, ax as QueryStatus, aq as RefetchOptions, as as RefetchQueryFilters, R as Register, au as ResetOptions, ap as ResultOptions, b7 as SetDataOptions, S as SkipToken, Z as StaleTime, _ as StaleTimeFunction, af as ThrowOnError, P as UnsetMarker, U as Updater, ah as WithRequired, K as dataTagErrorSymbol, J as dataTagSymbol, v as defaultShouldDehydrateMutation, u as defaultShouldDehydrateQuery, q as dehydrate, h as hashKey, t as hydrate, o as isCancelledError, i as isServer, k as keepPreviousData, f as matchMutation, m as matchQuery, n as noop, p as partialMatchKey, r as replaceEqualDeep, g as shouldThrowError, s as skipToken, L as unsetMarker } from './hydration-CADtEOkK.cjs';
export { QueriesObserver, QueriesObserverOptions } from './queriesObserver.cjs';
export { InfiniteQueryObserver } from './infiniteQueryObserver.cjs';
export { defaultScheduler, notifyManager } from './notifyManager.cjs';
export { focusManager } from './focusManager.cjs';
export { onlineManager } from './onlineManager.cjs';
export { streamedQuery as experimental_streamedQuery } from './streamedQuery.cjs';
import './removable.cjs';
import './subscribable.cjs';
frontend/node_modules/@tanstack/query-core/build/legacy/focusManager.d.ts (Line 1:1 - Line 17:2), frontend/node_modules/@tanstack/query-core/build/modern/focusManager.d.ts (Line 1:1 - Line 17:2)
frontend/node_modules/@hookform/resolvers/arktype/dist/types.d.ts (Line 1:1 - Line 9:2), frontend/node_modules/@hookform/resolvers/arktype/src/types.ts (Line 1:1 - Line 13:2)
import { Type } from 'arktype';
import { FieldValues, ResolverOptions, ResolverResult } from 'react-hook-form';
export type Resolver = <T extends Type<any>>(schema: T, schemaOptions?: undefined, factoryOptions?: {
/**
* Return the raw input values rather than the parsed values.
* @default false
*/
raw?: boolean;
})
frontend/shared/node_modules/typescript/lib/lib.esnext.collection.d.ts (Line 67:12 - Line 96:2), frontend/shared/node_modules/typescript/lib/lib.esnext.collection.d.ts (Line 36:4 - Line 65:2)
<T> {
/**
* @returns a new Set containing all the elements in this Set and also all the elements in the argument.
*/
union<U>(other: ReadonlySetLike<U>): Set<T | U>;
/**
* @returns a new Set containing all the elements which are both in this Set and in the argument.
*/
intersection<U>(other: ReadonlySetLike<U>): Set<T & U>;
/**
* @returns a new Set containing all the elements in this Set which are not also in the argument.
*/
difference<U>(other: ReadonlySetLike<U>): Set<T>;
/**
* @returns a new Set containing all the elements which are in either this Set or in the argument, but not in both.
*/
symmetricDifference<U>(other: ReadonlySetLike<U>): Set<T | U>;
/**
* @returns a boolean indicating whether all the elements in this Set are also in the argument.
*/
isSubsetOf(other: ReadonlySetLike<unknown>): boolean;
/**
* @returns a boolean indicating whether all the elements in the argument are also in this Set.
*/
isSupersetOf(other: ReadonlySetLike<unknown>): boolean;
/**
* @returns a boolean indicating whether this Set has no elements in common with the argument.
*/
isDisjointFrom(other: ReadonlySetLike<unknown>): boolean;
}
frontend/shared/node_modules/typescript/lib/lib.es2023.array.d.ts (Line 167:5 - Line 185:2), frontend/shared/node_modules/typescript/lib/lib.esnext.float16.d.ts (Line 115:5 - Line 136:2)
/**
* Returns the value of the last element in the array where predicate is true, and undefined
* otherwise.
* @param predicate findLast calls predicate once for each element of the array, in descending
* order, until it finds one where predicate returns true. If such an element is found, findLast
* immediately returns that element value. Otherwise, findLast returns undefined.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLast<S extends number>(
predicate: (
value: number,
index: number,
array: this,
) => value is S,
thisArg?: any,
): S | undefined;
findLast(
predicate: (value: number, index: number, array: this)
frontend/shared/node_modules/typescript/lib/lib.es2023.array.d.ts (Line 230:11 - Line 270:11), frontend/shared/node_modules/typescript/lib/lib.es2023.array.d.ts (Line 166:10 - Line 206:10)
<TArrayBuffer extends ArrayBufferLike> {
/**
* Returns the value of the last element in the array where predicate is true, and undefined
* otherwise.
* @param predicate findLast calls predicate once for each element of the array, in descending
* order, until it finds one where predicate returns true. If such an element is found, findLast
* immediately returns that element value. Otherwise, findLast returns undefined.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLast<S extends number>(
predicate: (
value: number,
index: number,
array: this,
) => value is S,
thisArg?: any,
): S | undefined;
findLast(
predicate: (value: number, index: number, array: this) => unknown,
thisArg?: any,
): number | undefined;
/**
* Returns the index of the last element in the array where predicate is true, and -1
* otherwise.
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
* order, until it finds one where predicate returns true. If such an element is found,
* findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLastIndex(
predicate: (value: number, index: number, array: this) => unknown,
thisArg?: any,
): number;
/**
* Copies the array and returns the copy with the elements in reverse order.
*/
toReversed(): Uint8Array
frontend/shared/node_modules/typescript/lib/lib.es2023.array.d.ts (Line 294:18 - Line 341:8), frontend/shared/node_modules/typescript/lib/lib.es2023.array.d.ts (Line 166:10 - Line 165:8)
<TArrayBuffer extends ArrayBufferLike> {
/**
* Returns the value of the last element in the array where predicate is true, and undefined
* otherwise.
* @param predicate findLast calls predicate once for each element of the array, in descending
* order, until it finds one where predicate returns true. If such an element is found, findLast
* immediately returns that element value. Otherwise, findLast returns undefined.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLast<S extends number>(
predicate: (
value: number,
index: number,
array: this,
) => value is S,
thisArg?: any,
): S | undefined;
findLast(
predicate: (
value: number,
index: number,
array: this,
) => unknown,
thisArg?: any,
): number | undefined;
/**
* Returns the index of the last element in the array where predicate is true, and -1
* otherwise.
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
* order, until it finds one where predicate returns true. If such an element is found,
* findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLastIndex(
predicate: (
value: number,
index: number,
array: this,
) => unknown,
thisArg?: any,
): number;
/**
* Copies the array and returns the copy with the elements in reverse order.
*/
frontend/shared/node_modules/typescript/lib/lib.es2023.array.d.ts (Line 366:11 - Line 406:11), frontend/shared/node_modules/typescript/lib/lib.es2023.array.d.ts (Line 166:10 - Line 206:10)
<TArrayBuffer extends ArrayBufferLike> {
/**
* Returns the value of the last element in the array where predicate is true, and undefined
* otherwise.
* @param predicate findLast calls predicate once for each element of the array, in descending
* order, until it finds one where predicate returns true. If such an element is found, findLast
* immediately returns that element value. Otherwise, findLast returns undefined.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLast<S extends number>(
predicate: (
value: number,
index: number,
array: this,
) => value is S,
thisArg?: any,
): S | undefined;
findLast(
predicate: (value: number, index: number, array: this) => unknown,
thisArg?: any,
): number | undefined;
/**
* Returns the index of the last element in the array where predicate is true, and -1
* otherwise.
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
* order, until it finds one where predicate returns true. If such an element is found,
* findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLastIndex(
predicate: (value: number, index: number, array: this) => unknown,
thisArg?: any,
): number;
/**
* Copies the array and returns the copy with the elements in reverse order.
*/
toReversed(): Int16Array
frontend/shared/node_modules/typescript/lib/lib.es2023.array.d.ts (Line 430:12 - Line 478:12), frontend/shared/node_modules/typescript/lib/lib.es2023.array.d.ts (Line 166:10 - Line 342:18)
<TArrayBuffer extends ArrayBufferLike> {
/**
* Returns the value of the last element in the array where predicate is true, and undefined
* otherwise.
* @param predicate findLast calls predicate once for each element of the array, in descending
* order, until it finds one where predicate returns true. If such an element is found, findLast
* immediately returns that element value. Otherwise, findLast returns undefined.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLast<S extends number>(
predicate: (
value: number,
index: number,
array: this,
) => value is S,
thisArg?: any,
): S | undefined;
findLast(
predicate: (
value: number,
index: number,
array: this,
) => unknown,
thisArg?: any,
): number | undefined;
/**
* Returns the index of the last element in the array where predicate is true, and -1
* otherwise.
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
* order, until it finds one where predicate returns true. If such an element is found,
* findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLastIndex(
predicate: (
value: number,
index: number,
array: this,
) => unknown,
thisArg?: any,
): number;
/**
* Copies the array and returns the copy with the elements in reverse order.
*/
toReversed(): Uint16Array
frontend/shared/node_modules/typescript/lib/lib.es2023.array.d.ts (Line 502:11 - Line 542:11), frontend/shared/node_modules/typescript/lib/lib.es2023.array.d.ts (Line 166:10 - Line 206:10)
<TArrayBuffer extends ArrayBufferLike> {
/**
* Returns the value of the last element in the array where predicate is true, and undefined
* otherwise.
* @param predicate findLast calls predicate once for each element of the array, in descending
* order, until it finds one where predicate returns true. If such an element is found, findLast
* immediately returns that element value. Otherwise, findLast returns undefined.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLast<S extends number>(
predicate: (
value: number,
index: number,
array: this,
) => value is S,
thisArg?: any,
): S | undefined;
findLast(
predicate: (value: number, index: number, array: this) => unknown,
thisArg?: any,
): number | undefined;
/**
* Returns the index of the last element in the array where predicate is true, and -1
* otherwise.
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
* order, until it finds one where predicate returns true. If such an element is found,
* findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLastIndex(
predicate: (value: number, index: number, array: this) => unknown,
thisArg?: any,
): number;
/**
* Copies the array and returns the copy with the elements in reverse order.
*/
toReversed(): Int32Array
frontend/shared/node_modules/typescript/lib/lib.es2023.array.d.ts (Line 566:12 - Line 614:12), frontend/shared/node_modules/typescript/lib/lib.es2023.array.d.ts (Line 166:10 - Line 342:18)
<TArrayBuffer extends ArrayBufferLike> {
/**
* Returns the value of the last element in the array where predicate is true, and undefined
* otherwise.
* @param predicate findLast calls predicate once for each element of the array, in descending
* order, until it finds one where predicate returns true. If such an element is found, findLast
* immediately returns that element value. Otherwise, findLast returns undefined.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLast<S extends number>(
predicate: (
value: number,
index: number,
array: this,
) => value is S,
thisArg?: any,
): S | undefined;
findLast(
predicate: (
value: number,
index: number,
array: this,
) => unknown,
thisArg?: any,
): number | undefined;
/**
* Returns the index of the last element in the array where predicate is true, and -1
* otherwise.
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
* order, until it finds one where predicate returns true. If such an element is found,
* findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLastIndex(
predicate: (
value: number,
index: number,
array: this,
) => unknown,
thisArg?: any,
): number;
/**
* Copies the array and returns the copy with the elements in reverse order.
*/
toReversed(): Uint32Array
frontend/shared/node_modules/typescript/lib/lib.es2023.array.d.ts (Line 638:13 - Line 686:13), frontend/shared/node_modules/typescript/lib/lib.es2023.array.d.ts (Line 166:10 - Line 342:18)
<TArrayBuffer extends ArrayBufferLike> {
/**
* Returns the value of the last element in the array where predicate is true, and undefined
* otherwise.
* @param predicate findLast calls predicate once for each element of the array, in descending
* order, until it finds one where predicate returns true. If such an element is found, findLast
* immediately returns that element value. Otherwise, findLast returns undefined.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLast<S extends number>(
predicate: (
value: number,
index: number,
array: this,
) => value is S,
thisArg?: any,
): S | undefined;
findLast(
predicate: (
value: number,
index: number,
array: this,
) => unknown,
thisArg?: any,
): number | undefined;
/**
* Returns the index of the last element in the array where predicate is true, and -1
* otherwise.
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
* order, until it finds one where predicate returns true. If such an element is found,
* findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLastIndex(
predicate: (
value: number,
index: number,
array: this,
) => unknown,
thisArg?: any,
): number;
/**
* Copies the array and returns the copy with the elements in reverse order.
*/
toReversed(): Float32Array
frontend/shared/node_modules/typescript/lib/lib.es2023.array.d.ts (Line 710:13 - Line 758:13), frontend/shared/node_modules/typescript/lib/lib.es2023.array.d.ts (Line 166:10 - Line 342:18)
<TArrayBuffer extends ArrayBufferLike> {
/**
* Returns the value of the last element in the array where predicate is true, and undefined
* otherwise.
* @param predicate findLast calls predicate once for each element of the array, in descending
* order, until it finds one where predicate returns true. If such an element is found, findLast
* immediately returns that element value. Otherwise, findLast returns undefined.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLast<S extends number>(
predicate: (
value: number,
index: number,
array: this,
) => value is S,
thisArg?: any,
): S | undefined;
findLast(
predicate: (
value: number,
index: number,
array: this,
) => unknown,
thisArg?: any,
): number | undefined;
/**
* Returns the index of the last element in the array where predicate is true, and -1
* otherwise.
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
* order, until it finds one where predicate returns true. If such an element is found,
* findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLastIndex(
predicate: (
value: number,
index: number,
array: this,
) => unknown,
thisArg?: any,
): number;
/**
* Copies the array and returns the copy with the elements in reverse order.
*/
toReversed(): Float64Array
frontend/shared/node_modules/typescript/lib/lib.es2023.array.d.ts (Line 854:15 - Line 902:15), frontend/shared/node_modules/typescript/lib/lib.es2023.array.d.ts (Line 782:14 - Line 830:14)
<TArrayBuffer extends ArrayBufferLike> {
/**
* Returns the value of the last element in the array where predicate is true, and undefined
* otherwise.
* @param predicate findLast calls predicate once for each element of the array, in descending
* order, until it finds one where predicate returns true. If such an element is found, findLast
* immediately returns that element value. Otherwise, findLast returns undefined.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLast<S extends bigint>(
predicate: (
value: bigint,
index: number,
array: this,
) => value is S,
thisArg?: any,
): S | undefined;
findLast(
predicate: (
value: bigint,
index: number,
array: this,
) => unknown,
thisArg?: any,
): bigint | undefined;
/**
* Returns the index of the last element in the array where predicate is true, and -1
* otherwise.
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
* order, until it finds one where predicate returns true. If such an element is found,
* findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLastIndex(
predicate: (
value: bigint,
index: number,
array: this,
) => unknown,
thisArg?: any,
): number;
/**
* Copies the array and returns the copy with the elements in reverse order.
*/
toReversed(): BigUint64Array
frontend/shared/node_modules/typescript/lib/lib.es2020.bigint.d.ts (Line 440:15 - Line 475:15), frontend/shared/node_modules/typescript/lib/lib.es2020.bigint.d.ts (Line 149:14 - Line 184:14)
<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
/** The size in bytes of each element in the array. */
readonly BYTES_PER_ELEMENT: number;
/** The ArrayBuffer instance referenced by the array. */
readonly buffer: TArrayBuffer;
/** The length in bytes of the array. */
readonly byteLength: number;
/** The offset in bytes of the array. */
readonly byteOffset: number;
/**
* Returns the this object after copying a section of the array identified by start and end
* to the same array starting at position target
* @param target If target is negative, it is treated as length+target where length is the
* length of the array.
* @param start If start is negative, it is treated as length+start. If end is negative, it
* is treated as length+end.
* @param end If not specified, length of the this object is used as its default value.
*/
copyWithin(target: number, start: number, end?: number): this;
/** Yields index, value pairs for every entry in the array. */
entries(): ArrayIterator<[number, bigint]>;
/**
* Determines whether all the members of an array satisfy the specified test.
* @param predicate A function that accepts up to three arguments. The every method calls
* the predicate function for each element in the array until the predicate returns false,
* or until the end of the array.
* @param thisArg An object to which the this keyword can refer in the predicate function.
* If thisArg is omitted, undefined is used as the this value.
*/
every(predicate: (value: bigint, index: number, array: BigUint64Array
frontend/shared/node_modules/typescript/lib/lib.es2020.bigint.d.ts (Line 475:15 - Line 494:15), frontend/shared/node_modules/typescript/lib/lib.es2020.bigint.d.ts (Line 184:14 - Line 203:14)
<TArrayBuffer>) => boolean, thisArg?: any): boolean;
/**
* Changes all array elements from `start` to `end` index to a static `value` and returns the modified array
* @param value value to fill array section with
* @param start index to start filling the array at. If start is negative, it is treated as
* length+start where length is the length of the array.
* @param end index to stop filling the array at. If end is negative, it is treated as
* length+end.
*/
fill(value: bigint, start?: number, end?: number): this;
/**
* Returns the elements of an array that meet the condition specified in a callback function.
* @param predicate A function that accepts up to three arguments. The filter method calls
* the predicate function one time for each element in the array.
* @param thisArg An object to which the this keyword can refer in the predicate function.
* If thisArg is omitted, undefined is used as the this value.
*/
filter(predicate: (value: bigint, index: number, array: BigUint64Array
frontend/shared/node_modules/typescript/lib/lib.es2020.bigint.d.ts (Line 525:15 - Line 571:15), frontend/shared/node_modules/typescript/lib/lib.es2020.bigint.d.ts (Line 234:14 - Line 280:14)
<TArrayBuffer>) => void, thisArg?: any): void;
/**
* Determines whether an array includes a certain element, returning true or false as appropriate.
* @param searchElement The element to search for.
* @param fromIndex The position in this array at which to begin searching for searchElement.
*/
includes(searchElement: bigint, fromIndex?: number): boolean;
/**
* Returns the index of the first occurrence of a value in an array.
* @param searchElement The value to locate in the array.
* @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
* search starts at index 0.
*/
indexOf(searchElement: bigint, fromIndex?: number): number;
/**
* Adds all the elements of an array separated by the specified separator string.
* @param separator A string used to separate one element of an array from the next in the
* resulting String. If omitted, the array elements are separated with a comma.
*/
join(separator?: string): string;
/** Yields each index in the array. */
keys(): ArrayIterator<number>;
/**
* Returns the index of the last occurrence of a value in an array.
* @param searchElement The value to locate in the array.
* @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
* search starts at index 0.
*/
lastIndexOf(searchElement: bigint, fromIndex?: number): number;
/** The length of the array. */
readonly length: number;
/**
* Calls a defined callback function on each element of an array, and returns an array that
* contains the results.
* @param callbackfn A function that accepts up to three arguments. The map method calls the
* callbackfn function one time for each element in the array.
* @param thisArg An object to which the this keyword can refer in the callbackfn function.
* If thisArg is omitted, undefined is used as the this value.
*/
map(callbackfn: (value: bigint, index: number, array: BigUint64Array
frontend/shared/node_modules/typescript/lib/lib.es2020.bigint.d.ts (Line 619:15 - Line 636:15), frontend/shared/node_modules/typescript/lib/lib.es2020.bigint.d.ts (Line 328:14 - Line 345:14)
<TArrayBuffer>) => U, initialValue: U): U;
/** Reverses the elements in the array. */
reverse(): this;
/**
* Sets a value or an array of values.
* @param array A typed or untyped array of values to set.
* @param offset The index in the current array at which the values are to be written.
*/
set(array: ArrayLike<bigint>, offset?: number): void;
/**
* Returns a section of an array.
* @param start The beginning of the specified portion of the array.
* @param end The end of the specified portion of the array.
*/
slice(start?: number, end?: number): BigUint64Array
frontend/shared/node_modules/typescript/lib/lib.es2019.array.d.ts (Line 53:6 - Line 79:2), frontend/shared/node_modules/typescript/lib/lib.es2019.array.d.ts (Line 25:14 - Line 51:2)
<T> {
/**
* Calls a defined callback function on each element of an array. Then, flattens the result into
* a new array.
* This is identical to a map followed by flat with depth 1.
*
* @param callback A function that accepts up to three arguments. The flatMap method calls the
* callback function one time for each element in the array.
* @param thisArg An object to which the this keyword can refer in the callback function. If
* thisArg is omitted, undefined is used as the this value.
*/
flatMap<U, This = undefined>(
callback: (this: This, value: T, index: number, array: T[]) => U | ReadonlyArray<U>,
thisArg?: This,
): U[];
/**
* Returns a new array with all sub-array elements concatenated into it recursively up to the
* specified depth.
*
* @param depth The maximum recursion depth
*/
flat<A, D extends number = 1>(
this: A,
depth?: D,
): FlatArray<A, D>[];
}
frontend/shared/node_modules/typescript/lib/lib.es2015.iterable.d.ts (Line 161:12 - Line 181:15), frontend/shared/node_modules/typescript/lib/lib.es2015.iterable.d.ts (Line 141:4 - Line 161:12)
<K, V> {
/** Returns an iterable of entries in the map. */
[Symbol.iterator](): MapIterator<[K, V]>;
/**
* Returns an iterable of key, value pairs for every entry in the map.
*/
entries(): MapIterator<[K, V]>;
/**
* Returns an iterable of keys in the map
*/
keys(): MapIterator<K>;
/**
* Returns an iterable of values in the map
*/
values(): MapIterator<V>;
}
interface MapConstructor
frontend/shared/node_modules/typescript/lib/lib.es2015.iterable.d.ts (Line 216:12 - Line 236:15), frontend/shared/node_modules/typescript/lib/lib.es2015.iterable.d.ts (Line 196:4 - Line 216:12)
<T> {
/** Iterates over values in the set. */
[Symbol.iterator](): SetIterator<T>;
/**
* Returns an iterable of [v,v] pairs for every value `v` in the set.
*/
entries(): SetIterator<[T, T]>;
/**
* Despite its name, returns an iterable of the values in the set.
*/
keys(): SetIterator<T>;
/**
* Returns an iterable of values in the set.
*/
values(): SetIterator<T>;
}
interface SetConstructor
frontend/shared/node_modules/typescript/lib/lib.es2015.iterable.d.ts (Line 312:11 - Line 331:22), frontend/shared/node_modules/typescript/lib/lib.es2015.iterable.d.ts (Line 275:10 - Line 294:21)
<TArrayBuffer extends ArrayBufferLike> {
[Symbol.iterator](): ArrayIterator<number>;
/**
* Returns an array of key, value pairs for every entry in the array
*/
entries(): ArrayIterator<[number, number]>;
/**
* Returns an list of keys in the array
*/
keys(): ArrayIterator<number>;
/**
* Returns an list of values in the array
*/
values(): ArrayIterator<number>;
}
interface Uint8ArrayConstructor
frontend/shared/node_modules/typescript/lib/lib.es2015.iterable.d.ts (Line 349:18 - Line 368:29), frontend/shared/node_modules/typescript/lib/lib.es2015.iterable.d.ts (Line 275:10 - Line 294:21)
<TArrayBuffer extends ArrayBufferLike> {
[Symbol.iterator](): ArrayIterator<number>;
/**
* Returns an array of key, value pairs for every entry in the array
*/
entries(): ArrayIterator<[number, number]>;
/**
* Returns an list of keys in the array
*/
keys(): ArrayIterator<number>;
/**
* Returns an list of values in the array
*/
values(): ArrayIterator<number>;
}
interface Uint8ClampedArrayConstructor
frontend/shared/node_modules/typescript/lib/lib.es2015.iterable.d.ts (Line 386:11 - Line 404:22), frontend/shared/node_modules/typescript/lib/lib.es2015.iterable.d.ts (Line 275:10 - Line 294:21)
<TArrayBuffer extends ArrayBufferLike> {
[Symbol.iterator](): ArrayIterator<number>;
/**
* Returns an array of key, value pairs for every entry in the array
*/
entries(): ArrayIterator<[number, number]>;
/**
* Returns an list of keys in the array
*/
keys(): ArrayIterator<number>;
/**
* Returns an list of values in the array
*/
values(): ArrayIterator<number>;
}
interface Int16ArrayConstructor
frontend/shared/node_modules/typescript/lib/lib.es2015.iterable.d.ts (Line 422:12 - Line 441:23), frontend/shared/node_modules/typescript/lib/lib.es2015.iterable.d.ts (Line 275:10 - Line 294:21)
<TArrayBuffer extends ArrayBufferLike> {
[Symbol.iterator](): ArrayIterator<number>;
/**
* Returns an array of key, value pairs for every entry in the array
*/
entries(): ArrayIterator<[number, number]>;
/**
* Returns an list of keys in the array
*/
keys(): ArrayIterator<number>;
/**
* Returns an list of values in the array
*/
values(): ArrayIterator<number>;
}
interface Uint16ArrayConstructor
frontend/shared/node_modules/typescript/lib/lib.es2015.iterable.d.ts (Line 459:11 - Line 478:22), frontend/shared/node_modules/typescript/lib/lib.es2015.iterable.d.ts (Line 275:10 - Line 294:21)
<TArrayBuffer extends ArrayBufferLike> {
[Symbol.iterator](): ArrayIterator<number>;
/**
* Returns an array of key, value pairs for every entry in the array
*/
entries(): ArrayIterator<[number, number]>;
/**
* Returns an list of keys in the array
*/
keys(): ArrayIterator<number>;
/**
* Returns an list of values in the array
*/
values(): ArrayIterator<number>;
}
interface Int32ArrayConstructor
frontend/shared/node_modules/typescript/lib/lib.es2015.iterable.d.ts (Line 496:12 - Line 515:23), frontend/shared/node_modules/typescript/lib/lib.es2015.iterable.d.ts (Line 275:10 - Line 294:21)
<TArrayBuffer extends ArrayBufferLike> {
[Symbol.iterator](): ArrayIterator<number>;
/**
* Returns an array of key, value pairs for every entry in the array
*/
entries(): ArrayIterator<[number, number]>;
/**
* Returns an list of keys in the array
*/
keys(): ArrayIterator<number>;
/**
* Returns an list of values in the array
*/
values(): ArrayIterator<number>;
}
interface Uint32ArrayConstructor
frontend/shared/node_modules/typescript/lib/lib.es2015.iterable.d.ts (Line 533:13 - Line 552:24), frontend/shared/node_modules/typescript/lib/lib.es2015.iterable.d.ts (Line 275:10 - Line 294:21)
<TArrayBuffer extends ArrayBufferLike> {
[Symbol.iterator](): ArrayIterator<number>;
/**
* Returns an array of key, value pairs for every entry in the array
*/
entries(): ArrayIterator<[number, number]>;
/**
* Returns an list of keys in the array
*/
keys(): ArrayIterator<number>;
/**
* Returns an list of values in the array
*/
values(): ArrayIterator<number>;
}
interface Float32ArrayConstructor
frontend/shared/node_modules/typescript/lib/lib.es2015.iterable.d.ts (Line 570:13 - Line 589:24), frontend/shared/node_modules/typescript/lib/lib.es2015.iterable.d.ts (Line 275:10 - Line 294:21)
<TArrayBuffer extends ArrayBufferLike> {
[Symbol.iterator](): ArrayIterator<number>;
/**
* Returns an array of key, value pairs for every entry in the array
*/
entries(): ArrayIterator<[number, number]>;
/**
* Returns an list of keys in the array
*/
keys(): ArrayIterator<number>;
/**
* Returns an list of values in the array
*/
values(): ArrayIterator<number>;
}
interface Float64ArrayConstructor
frontend/shared/node_modules/typescript/lib/lib.dom.iterable.d.ts (Line 54:7 - Line 86:15), frontend/shared/node_modules/typescript/lib/lib.webworker.iterable.d.ts (Line 27:16 - Line 59:14)
frontend/shared/node_modules/typescript/lib/lib.dom.iterable.d.ts (Line 109:1 - Line 132:18), frontend/shared/node_modules/typescript/lib/lib.webworker.iterable.d.ts (Line 61:1 - Line 84:16)
}
interface FileList {
[Symbol.iterator](): ArrayIterator<File>;
}
interface FontFaceSet extends Set<FontFace> {
}
interface FormDataIterator<T> extends IteratorObject<T, BuiltinIteratorReturn, unknown> {
[Symbol.iterator](): FormDataIterator<T>;
}
interface FormData {
[Symbol.iterator](): FormDataIterator<[string, FormDataEntryValue]>;
/** Returns an array of key, value pairs for every entry in the list. */
entries(): FormDataIterator<[string, FormDataEntryValue]>;
/** Returns a list of keys in the list. */
keys(): FormDataIterator<string>;
/** Returns a list of values in the list. */
values(): FormDataIterator<FormDataEntryValue>;
}
interface HTMLAllCollection
frontend/shared/node_modules/typescript/lib/lib.dom.iterable.d.ts (Line 149:18 - Line 166:10), frontend/shared/node_modules/typescript/lib/lib.webworker.iterable.d.ts (Line 81:19 - Line 98:12)
>;
}
interface HeadersIterator<T> extends IteratorObject<T, BuiltinIteratorReturn, unknown> {
[Symbol.iterator](): HeadersIterator<T>;
}
interface Headers {
[Symbol.iterator](): HeadersIterator<[string, string]>;
/** Returns an iterator allowing to go through all key/value pairs contained in this object. */
entries(): HeadersIterator<[string, string]>;
/** Returns an iterator allowing to go through all keys of the key/value pairs contained in this object. */
keys(): HeadersIterator<string>;
/** Returns an iterator allowing to go through all values of the key/value pairs contained in this object. */
values(): HeadersIterator<string>;
}
interface Highlight
frontend/shared/node_modules/typescript/lib/lib.dom.iterable.d.ts (Line 170:1 - Line 196:13), frontend/shared/node_modules/typescript/lib/lib.webworker.iterable.d.ts (Line 96:1 - Line 122:13)
}
interface IDBDatabase {
/**
* Returns a new transaction with the given mode ("readonly" or "readwrite") and scope which can be a single object store name or an array of names.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBDatabase/transaction)
*/
transaction(storeNames: string | Iterable<string>, mode?: IDBTransactionMode, options?: IDBTransactionOptions): IDBTransaction;
}
interface IDBObjectStore {
/**
* Creates a new index in store with the given name, keyPath and options and returns a new IDBIndex. If the keyPath and options define constraints that cannot be satisfied with the data already in store the upgrade transaction will abort with a "ConstraintError" DOMException.
*
* Throws an "InvalidStateError" DOMException if not called within an upgrade transaction.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/createIndex)
*/
createIndex(name: string, keyPath: string | Iterable<string>, options?: IDBIndexParameters): IDBIndex;
}
interface ImageTrackList {
[Symbol.iterator](): ArrayIterator<ImageTrack>;
}
interface MIDIInputMap
frontend/shared/node_modules/typescript/lib/lib.dom.iterable.d.ts (Line 219:7 - Line 227:14), frontend/shared/node_modules/typescript/lib/lib.webworker.iterable.d.ts (Line 119:11 - Line 127:33)
frontend/shared/node_modules/typescript/lib/lib.dom.iterable.d.ts (Line 353:6 - Line 370:22), frontend/shared/node_modules/typescript/lib/lib.webworker.iterable.d.ts (Line 150:10 - Line 167:19)
>;
}
interface URLSearchParamsIterator<T> extends IteratorObject<T, BuiltinIteratorReturn, unknown> {
[Symbol.iterator](): URLSearchParamsIterator<T>;
}
interface URLSearchParams {
[Symbol.iterator](): URLSearchParamsIterator<[string, string]>;
/** Returns an array of key, value pairs for every entry in the search params. */
entries(): URLSearchParamsIterator<[string, string]>;
/** Returns a list of keys in the search params. */
keys(): URLSearchParamsIterator<string>;
/** Returns a list of values in the search params. */
values(): URLSearchParamsIterator<string>;
}
interface ViewTransitionTypeSet
frontend/shared/node_modules/typescript/lib/lib.dom.iterable.d.ts (Line 371:1 - Line 493:2), frontend/shared/node_modules/typescript/lib/lib.webworker.iterable.d.ts (Line 165:1 - Line 287:2)
frontend/node_modules/zustand/ts3.4/middleware/redux.d.ts (Line 1:1 - Line 30:2), frontend/node_modules/zustand/ts3.4/esm/middleware/redux.d.ts (Line 1:1 - Line 30:2)
import { StateCreator, StoreMutatorIdentifier } from '../vanilla';
type Write<T, U> = Pick<T, Exclude<keyof T, keyof U>> & U;
type Action = {
type: string;
};
type StoreRedux<A> = {
dispatch: (a: A) => A;
dispatchFromDevtools: true;
};
type ReduxState<A> = {
dispatch: StoreRedux<A>['dispatch'];
};
type WithRedux<S, A> = Write<S, StoreRedux<A>>;
type Redux = <T, A extends Action, Cms extends [
StoreMutatorIdentifier,
unknown
][] = [
]>(reducer: (state: T, action: A) => T, initialState: T) => StateCreator<Write<T, ReduxState<A>>, Cms, [
[
'zustand/redux',
A
]
]>;
declare module '../vanilla' {
interface StoreMutators<S, A> {
'zustand/redux': WithRedux<S, A>;
}
}
export declare const redux: Redux;
export {};
frontend/node_modules/zustand/ts3.4/middleware/persist.d.ts (Line 1:1 - Line 139:2), frontend/node_modules/zustand/ts3.4/esm/middleware/persist.d.ts (Line 1:1 - Line 139:2)
import { StateCreator, StoreMutatorIdentifier } from '../vanilla';
export interface StateStorage {
getItem: (name: string) => string | null | Promise<string | null>;
setItem: (name: string, value: string) => unknown | Promise<unknown>;
removeItem: (name: string) => unknown | Promise<unknown>;
}
export type StorageValue<S> = {
state: S;
version?: number;
};
export interface PersistStorage<S> {
getItem: (name: string) => StorageValue<S> | null | Promise<StorageValue<S> | null>;
setItem: (name: string, value: StorageValue<S>) => unknown | Promise<unknown>;
removeItem: (name: string) => unknown | Promise<unknown>;
}
type JsonStorageOptions = {
reviver?: (key: string, value: unknown) => unknown;
replacer?: (key: string, value: unknown) => unknown;
};
export declare function createJSONStorage<S>(getStorage: () => StateStorage, options?: JsonStorageOptions): PersistStorage<S> | undefined;
export interface PersistOptions<S, PersistedState = S> {
/** Name of the storage (must be unique) */
name: string;
/**
* @deprecated Use `storage` instead.
* A function returning a storage.
* The storage must fit `window.localStorage`'s api (or an async version of it).
* For example the storage could be `AsyncStorage` from React Native.
*
* @default () => localStorage
*/
getStorage?: () => StateStorage;
/**
* @deprecated Use `storage` instead.
* Use a custom serializer.
* The returned string will be stored in the storage.
*
* @default JSON.stringify
*/
serialize?: (state: StorageValue<S>) => string | Promise<string>;
/**
* @deprecated Use `storage` instead.
* Use a custom deserializer.
* Must return an object matching StorageValue<S>
*
* @param str The storage's current value.
* @default JSON.parse
*/
deserialize?: (str: string) => StorageValue<PersistedState> | Promise<StorageValue<PersistedState>>;
/**
* Use a custom persist storage.
*
* Combining `createJSONStorage` helps creating a persist storage
* with JSON.parse and JSON.stringify.
*
* @default createJSONStorage(() => localStorage)
*/
storage?: PersistStorage<PersistedState> | undefined;
/**
* Filter the persisted value.
*
* @params state The state's value
*/
partialize?: (state: S) => PersistedState;
/**
* A function returning another (optional) function.
* The main function will be called before the state rehydration.
* The returned function will be called after the state rehydration or when an error occurred.
*/
onRehydrateStorage?: (state: S) => ((state?: S, error?: unknown) => void) | void;
/**
* If the stored state's version mismatch the one specified here, the storage will not be used.
* This is useful when adding a breaking change to your store.
*/
version?: number;
/**
* A function to perform persisted state migration.
* This function will be called when persisted state versions mismatch with the one specified here.
*/
migrate?: (persistedState: unknown, version: number) => PersistedState | Promise<PersistedState>;
/**
* A function to perform custom hydration merges when combining the stored state with the current one.
* By default, this function does a shallow merge.
*/
merge?: (persistedState: unknown, currentState: S) => S;
/**
* An optional boolean that will prevent the persist middleware from triggering hydration on initialization,
* This allows you to call `rehydrate()` at a specific point in your apps rendering life-cycle.
*
* This is useful in SSR application.
*
* @default false
*/
skipHydration?: boolean;
}
type PersistListener<S> = (state: S) => void;
type StorePersist<S, Ps> = {
persist: {
setOptions: (options: Partial<PersistOptions<S, Ps>>) => void;
clearStorage: () => void;
rehydrate: () => Promise<void> | void;
hasHydrated: () => boolean;
onHydrate: (fn: PersistListener<S>) => () => void;
onFinishHydration: (fn: PersistListener<S>) => () => void;
getOptions: () => Partial<PersistOptions<S, Ps>>;
};
};
type Persist = <T, Mps extends [
StoreMutatorIdentifier,
unknown
][] = [
], Mcs extends [
StoreMutatorIdentifier,
unknown
][] = [
], U = T>(initializer: StateCreator<T, [
...Mps,
[
'zustand/persist',
unknown
]
], Mcs>, options: PersistOptions<T, U>) => StateCreator<T, Mps, [
[
'zustand/persist',
U
],
...Mcs
]>;
declare module '../vanilla' {
interface StoreMutators<S, A> {
'zustand/persist': WithPersist<S, A>;
}
}
type Write<T, U> = Pick<T, Exclude<keyof T, keyof U>> & U;
type WithPersist<S, A> = S extends {
getState: () => infer T;
} ? Write<S, StorePersist<T, A>> : never;
export declare const persist: Persist;
export {};
frontend/node_modules/zustand/ts3.4/middleware/immer.d.ts (Line 1:1 - Line 60:2), frontend/node_modules/zustand/ts3.4/esm/middleware/immer.d.ts (Line 1:1 - Line 60:2)
import { Draft } from 'immer';
import { StateCreator, StoreMutatorIdentifier } from '../vanilla';
type Immer = <T, Mps extends [
StoreMutatorIdentifier,
unknown
][] = [
], Mcs extends [
StoreMutatorIdentifier,
unknown
][] = [
]>(initializer: StateCreator<T, [
...Mps,
[
'zustand/immer',
never
]
], Mcs>) => StateCreator<T, Mps, [
[
'zustand/immer',
never
],
...Mcs
]>;
declare module '../vanilla' {
interface StoreMutators<S, A> {
['zustand/immer']: WithImmer<S>;
}
}
type Write<T, U> = Pick<T, Exclude<keyof T, keyof U>> & U;
type SkipTwo<T> = T extends {
length: 0;
} ? [
] : T extends {
length: 1;
} ? [
] : T extends {
length: 0 | 1;
} ? [
] : T extends [
unknown,
unknown,
...infer A
] ? A : T extends [
unknown,
unknown?,
...infer A
] ? A : T extends [
unknown?,
unknown?,
...infer A
] ? A : never;
type WithImmer<S> = Write<S, StoreImmer<S>>;
type StoreImmer<S> = S extends {
getState: () => infer T;
setState: infer SetState;
} ? SetState extends (...a: infer A) => infer Sr ? {
setState(nextStateOrUpdater: T | Partial<T> | ((state: Draft<T>) => void), shouldReplace?: boolean | undefined, ...a: SkipTwo<A>): Sr;
} : never : never;
export declare const immer: Immer;
export {};
frontend/node_modules/zustand/ts3.4/middleware/devtools.d.ts (Line 1:1 - Line 102:2), frontend/node_modules/zustand/ts3.4/esm/middleware/devtools.d.ts (Line 1:1 - Line 102:2)
import { StateCreator, StoreApi, StoreMutatorIdentifier } from '../vanilla';
type Config = Parameters<(Window extends {
__REDUX_DEVTOOLS_EXTENSION__?: infer T;
} ? T : {
connect: (param: any) => any;
})['connect']>[0];
declare module '../vanilla' {
interface StoreMutators<S, A> {
'zustand/devtools': WithDevtools<S>;
}
}
type Cast<T, U> = T extends U ? T : U;
type Write<T, U> = Pick<T, Exclude<keyof T, keyof U>> & U;
type TakeTwo<T> = T extends {
length: 0;
} ? [
undefined,
undefined
] : T extends {
length: 1;
} ? [
/*a0*/ ...Cast<T, unknown[]>,
/*a1*/ undefined
] : T extends {
length: 0 | 1;
} ? [
/*a0*/ ...Cast<T, unknown[]>,
/*a1*/ undefined
] : T extends {
length: 2;
} ? T : T extends {
length: 1 | 2;
} ? T : T extends {
length: 0 | 1 | 2;
} ? T : T extends [
infer A0,
infer A1,
...unknown[]
] ? [
A0,
A1
] : T extends [
infer A0,
(infer A1)?,
...unknown[]
] ? [
A0,
A1?
] : T extends [
(infer A0)?,
(infer A1)?,
...unknown[]
] ? [
A0?,
A1?
] : never;
type WithDevtools<S> = Write<S, StoreDevtools<S>>;
type StoreDevtools<S> = S extends {
setState: (...a: infer Sa) => infer Sr;
} ? {
setState<A extends string | {
type: string;
}>(...a: [
/*a*/ ...TakeTwo<Sa>,
/*action*/ A
]): Sr;
} : never;
export interface DevtoolsOptions extends Config {
name?: string;
enabled?: boolean;
anonymousActionType?: string;
store?: string;
}
type Devtools = <T, Mps extends [
StoreMutatorIdentifier,
unknown
][] = [
], Mcs extends [
StoreMutatorIdentifier,
unknown
][] = [
]>(initializer: StateCreator<T, [
...Mps,
[
'zustand/devtools',
never
]
], Mcs>, devtoolsOptions?: DevtoolsOptions) => StateCreator<T, Mps, [
[
'zustand/devtools',
never
],
...Mcs
]>;
declare module '../vanilla' {
interface StoreMutators<S, A> {
'zustand/devtools': WithDevtools<S>;
}
}
export type NamedSet<T> = WithDevtools<StoreApi<T>>['setState'];
export declare const devtools: Devtools;
export {};
frontend/node_modules/zustand/ts3.4/middleware/combine.d.ts (Line 1:1 - Line 13:2), frontend/node_modules/zustand/ts3.4/esm/middleware/combine.d.ts (Line 1:1 - Line 13:2)
frontend/node_modules/zustand/esm/middleware/persist.d.mts (Line 1:17 - Line 109:17), frontend/node_modules/zustand/ts3.4/esm/middleware/persist.d.ts (Line 1:13 - Line 129:13)
;
export interface StateStorage {
getItem: (name: string) => string | null | Promise<string | null>;
setItem: (name: string, value: string) => unknown | Promise<unknown>;
removeItem: (name: string) => unknown | Promise<unknown>;
}
export type StorageValue<S> = {
state: S;
version?: number;
};
export interface PersistStorage<S> {
getItem: (name: string) => StorageValue<S> | null | Promise<StorageValue<S> | null>;
setItem: (name: string, value: StorageValue<S>) => unknown | Promise<unknown>;
removeItem: (name: string) => unknown | Promise<unknown>;
}
type JsonStorageOptions = {
reviver?: (key: string, value: unknown) => unknown;
replacer?: (key: string, value: unknown) => unknown;
};
export declare function createJSONStorage<S>(getStorage: () => StateStorage, options?: JsonStorageOptions): PersistStorage<S> | undefined;
export interface PersistOptions<S, PersistedState = S> {
/** Name of the storage (must be unique) */
name: string;
/**
* @deprecated Use `storage` instead.
* A function returning a storage.
* The storage must fit `window.localStorage`'s api (or an async version of it).
* For example the storage could be `AsyncStorage` from React Native.
*
* @default () => localStorage
*/
getStorage?: () => StateStorage;
/**
* @deprecated Use `storage` instead.
* Use a custom serializer.
* The returned string will be stored in the storage.
*
* @default JSON.stringify
*/
serialize?: (state: StorageValue<S>) => string | Promise<string>;
/**
* @deprecated Use `storage` instead.
* Use a custom deserializer.
* Must return an object matching StorageValue<S>
*
* @param str The storage's current value.
* @default JSON.parse
*/
deserialize?: (str: string) => StorageValue<PersistedState> | Promise<StorageValue<PersistedState>>;
/**
* Use a custom persist storage.
*
* Combining `createJSONStorage` helps creating a persist storage
* with JSON.parse and JSON.stringify.
*
* @default createJSONStorage(() => localStorage)
*/
storage?: PersistStorage<PersistedState> | undefined;
/**
* Filter the persisted value.
*
* @params state The state's value
*/
partialize?: (state: S) => PersistedState;
/**
* A function returning another (optional) function.
* The main function will be called before the state rehydration.
* The returned function will be called after the state rehydration or when an error occurred.
*/
onRehydrateStorage?: (state: S) => ((state?: S, error?: unknown) => void) | void;
/**
* If the stored state's version mismatch the one specified here, the storage will not be used.
* This is useful when adding a breaking change to your store.
*/
version?: number;
/**
* A function to perform persisted state migration.
* This function will be called when persisted state versions mismatch with the one specified here.
*/
migrate?: (persistedState: unknown, version: number) => PersistedState | Promise<PersistedState>;
/**
* A function to perform custom hydration merges when combining the stored state with the current one.
* By default, this function does a shallow merge.
*/
merge?: (persistedState: unknown, currentState: S) => S;
/**
* An optional boolean that will prevent the persist middleware from triggering hydration on initialization,
* This allows you to call `rehydrate()` at a specific point in your apps rendering life-cycle.
*
* This is useful in SSR application.
*
* @default false
*/
skipHydration?: boolean;
}
type PersistListener<S> = (state: S) => void;
type StorePersist<S, Ps> = {
persist: {
setOptions: (options: Partial<PersistOptions<S, Ps>>) => void;
clearStorage: () => void;
rehydrate: () => Promise<void> | void;
hasHydrated: () => boolean;
onHydrate: (fn: PersistListener<S>) => () => void;
onFinishHydration: (fn: PersistListener<S>) => () => void;
getOptions: () => Partial<PersistOptions<S, Ps>>;
};
};
type Persist = <T, Mps extends [StoreMutatorIdentifier, unknown][] = [], Mcs extends [StoreMutatorIdentifier, unknown][] = [], U = T>(initializer: StateCreator<T, [...Mps, ['zustand/persist', unknown]], Mcs>, options: PersistOptions<T, U>) => StateCreator<T, Mps, [['zustand/persist', U], ...Mcs]>;
declare module '../vanilla.mjs'
frontend/node_modules/zustand/esm/middleware/persist.d.mts (Line 109:2 - Line 119:2), frontend/node_modules/zustand/esm/middleware/persist.d.ts (Line 109:2 - Line 119:2)
{
interface StoreMutators<S, A> {
'zustand/persist': WithPersist<S, A>;
}
}
type Write<T, U> = Omit<T, keyof U> & U;
type WithPersist<S, A> = S extends {
getState: () => infer T;
} ? Write<S, StorePersist<T, A>> : never;
export declare const persist: Persist;
export {};
frontend/node_modules/zustand/esm/middleware/immer.d.ts (Line 2:2 - Line 9:5), frontend/node_modules/zustand/ts3.4/esm/middleware/immer.d.ts (Line 2:2 - Line 29:5)
{ StateCreator, StoreMutatorIdentifier } from '../vanilla';
type Immer = <T, Mps extends [StoreMutatorIdentifier, unknown][] = [], Mcs extends [StoreMutatorIdentifier, unknown][] = []>(initializer: StateCreator<T, [...Mps, ['zustand/immer', never]], Mcs>) => StateCreator<T, Mps, [['zustand/immer', never], ...Mcs]>;
declare module '../vanilla' {
interface StoreMutators<S, A> {
['zustand/immer']: WithImmer<S>;
}
}
type Write<T, U> = Omit
frontend/node_modules/zustand/esm/middleware/immer.d.ts (Line 9:2 - Line 25:2), frontend/node_modules/zustand/ts3.4/esm/middleware/immer.d.ts (Line 29:2 - Line 60:2)
& U;
type SkipTwo<T> = T extends {
length: 0;
} ? [] : T extends {
length: 1;
} ? [] : T extends {
length: 0 | 1;
} ? [] : T extends [unknown, unknown, ...infer A] ? A : T extends [unknown, unknown?, ...infer A] ? A : T extends [unknown?, unknown?, ...infer A] ? A : never;
type WithImmer<S> = Write<S, StoreImmer<S>>;
type StoreImmer<S> = S extends {
getState: () => infer T;
setState: infer SetState;
} ? SetState extends (...a: infer A) => infer Sr ? {
setState(nextStateOrUpdater: T | Partial<T> | ((state: Draft<T>) => void), shouldReplace?: boolean | undefined, ...a: SkipTwo<A>): Sr;
} : never : never;
export declare const immer: Immer;
export {};
frontend/node_modules/zustand/esm/middleware/immer.d.mts (Line 4:2 - Line 25:2), frontend/node_modules/zustand/esm/middleware/immer.d.ts (Line 4:2 - Line 60:2)
{
interface StoreMutators<S, A> {
['zustand/immer']: WithImmer<S>;
}
}
type Write<T, U> = Omit<T, keyof U> & U;
type SkipTwo<T> = T extends {
length: 0;
} ? [] : T extends {
length: 1;
} ? [] : T extends {
length: 0 | 1;
} ? [] : T extends [unknown, unknown, ...infer A] ? A : T extends [unknown, unknown?, ...infer A] ? A : T extends [unknown?, unknown?, ...infer A] ? A : never;
type WithImmer<S> = Write<S, StoreImmer<S>>;
type StoreImmer<S> = S extends {
getState: () => infer T;
setState: infer SetState;
} ? SetState extends (...a: infer A) => infer Sr ? {
setState(nextStateOrUpdater: T | Partial<T> | ((state: Draft<T>) => void), shouldReplace?: boolean | undefined, ...a: SkipTwo<A>): Sr;
} : never : never;
export declare const immer: Immer;
export {};
frontend/node_modules/zustand/esm/middleware/devtools.d.ts (Line 1:2 - Line 13:5), frontend/node_modules/zustand/ts3.4/esm/middleware/devtools.d.ts (Line 1:2 - Line 13:5)
{ StateCreator, StoreApi, StoreMutatorIdentifier } from '../vanilla';
type Config = Parameters<(Window extends {
__REDUX_DEVTOOLS_EXTENSION__?: infer T;
} ? T : {
connect: (param: any) => any;
})['connect']>[0];
declare module '../vanilla' {
interface StoreMutators<S, A> {
'zustand/devtools': WithDevtools<S>;
}
}
type Cast<T, U> = T extends U ? T : U;
type Write<T, U> = Omit
frontend/node_modules/zustand/esm/middleware/devtools.d.ts (Line 20:2 - Line 33:4), frontend/node_modules/zustand/ts3.4/esm/middleware/devtools.d.ts (Line 28:2 - Line 64:6)
undefined] : T extends {
length: 2;
} ? T : T extends {
length: 1 | 2;
} ? T : T extends {
length: 0 | 1 | 2;
} ? T : T extends [infer A0, infer A1, ...unknown[]] ? [A0, A1] : T extends [infer A0, (infer A1)?, ...unknown[]] ? [A0, A1?] : T extends [(infer A0)?, (infer A1)?, ...unknown[]] ? [A0?, A1?] : never;
type WithDevtools<S> = Write<S, StoreDevtools<S>>;
type StoreDevtools<S> = S extends {
setState: (...a: infer Sa) => infer Sr;
} ? {
setState<A extends string | {
type: string;
}>(...a: [...
frontend/node_modules/zustand/esm/middleware/devtools.d.ts (Line 33:2 - Line 49:2), frontend/node_modules/zustand/ts3.4/esm/middleware/devtools.d.ts (Line 65:2 - Line 102:2)
frontend/node_modules/zod/v4/mini/external.d.ts (Line 1:1 - Line 9:7), frontend/node_modules/zod/src/v4/mini/external.ts (Line 1:1 - Line 28:37)
export * as core from "../core/index.js";
export * from "./parse.js";
export * from "./schemas.js";
export * from "./checks.js";
export type { infer, output, input } from "../core/index.js";
export { globalRegistry, registry, config, $output, $input, $brand, function, clone, regexes, treeifyError, prettifyError, formatError, flattenError, toJSONSchema, TimePrecision, NEVER, } from "../core/index.js";
export * as locales from "../locales/index.js";
/** A special constant with type `never` */
export
frontend/node_modules/zod/v4/mini/coerce.d.cts (Line 2:16 - Line 7:2), frontend/node_modules/zod/v4/mini/coerce.d.ts (Line 2:15 - Line 7:2)
frontend/node_modules/zod/v4/locales/index.d.ts (Line 1:1 - Line 39:2), frontend/node_modules/zod/src/v4/locales/index.ts (Line 1:1 - Line 39:2)
export { default as ar } from "./ar.js";
export { default as az } from "./az.js";
export { default as be } from "./be.js";
export { default as ca } from "./ca.js";
export { default as cs } from "./cs.js";
export { default as de } from "./de.js";
export { default as en } from "./en.js";
export { default as eo } from "./eo.js";
export { default as es } from "./es.js";
export { default as fa } from "./fa.js";
export { default as fi } from "./fi.js";
export { default as fr } from "./fr.js";
export { default as frCA } from "./fr-CA.js";
export { default as he } from "./he.js";
export { default as hu } from "./hu.js";
export { default as id } from "./id.js";
export { default as it } from "./it.js";
export { default as ja } from "./ja.js";
export { default as kh } from "./kh.js";
export { default as ko } from "./ko.js";
export { default as mk } from "./mk.js";
export { default as ms } from "./ms.js";
export { default as nl } from "./nl.js";
export { default as no } from "./no.js";
export { default as ota } from "./ota.js";
export { default as ps } from "./ps.js";
export { default as pl } from "./pl.js";
export { default as pt } from "./pt.js";
export { default as ru } from "./ru.js";
export { default as sl } from "./sl.js";
export { default as sv } from "./sv.js";
export { default as ta } from "./ta.js";
export { default as th } from "./th.js";
export { default as tr } from "./tr.js";
export { default as ua } from "./ua.js";
export { default as ur } from "./ur.js";
export { default as vi } from "./vi.js";
export { default as zhCN } from "./zh-CN.js";
export { default as zhTW } from "./zh-TW.js";
frontend/node_modules/zod/v4/core/util.d.ts (Line 12:1 - Line 27:2), frontend/node_modules/zod/src/v4/core/util.ts (Line 81:1 - Line 96:2)
export type AssertEqual<T, U> = (<V>() => V extends T ? 1 : 2) extends <V>() => V extends U ? 1 : 2 ? true : false;
export type AssertNotEqual<T, U> = (<V>() => V extends T ? 1 : 2) extends <V>() => V extends U ? 1 : 2 ? false : true;
export type AssertExtends<T, U> = T extends U ? T : never;
export type IsAny<T> = 0 extends 1 & T ? true : false;
export type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
export type OmitKeys<T, K extends string> = Pick<T, Exclude<keyof T, K>>;
export type MakePartial<T, K extends keyof T> = Omit<T, K> & InexactPartial<Pick<T, K>>;
export type MakeRequired<T, K extends keyof T> = Omit<T, K> & Required<Pick<T, K>>;
export type Exactly<T, X> = T & Record<Exclude<keyof X, keyof T>, never>;
export type NoUndefined<T> = T extends undefined ? never : T;
export type Whatever = {} | undefined | null;
export type LoosePartial<T extends object> = InexactPartial<T> & {
[k: string]: unknown;
};
export type Mask<Keys extends PropertyKey> = {
[K in Keys]?: true;
frontend/node_modules/zod/v4/core/util.d.ts (Line 38:1 - Line 43:2), frontend/node_modules/zod/src/v4/core/util.ts (Line 104:2 - Line 123:2)
} | Date | Error | Generator | Promise<unknown> | RegExp;
export type MakeReadonly<T> = T extends Map<infer K, infer V> ? ReadonlyMap<K, V> : T extends Set<infer V> ? ReadonlySet<V> : T extends [infer Head, ...infer Tail] ? readonly [Head, ...Tail] : T extends Array<infer V> ? ReadonlyArray<V> : T extends BuiltIn ? T : Readonly<T>;
export type SomeObject = Record<PropertyKey, any>;
export type Identity<T> = T;
export type Flatten<T> = Identity<{
[k in keyof T]: T[k];
frontend/node_modules/zod/v4/core/util.d.ts (Line 47:1 - Line 57:6), frontend/node_modules/zod/src/v4/core/util.ts (Line 124:2 - Line 136:43)
};
export type Prettify<T> = {
[K in keyof T]: T[K];
} & {};
export type NoNeverKeys<T> = {
[k in keyof T]: [T[k]] extends [never] ? never : k;
}[keyof T];
export type NoNever<T> = Identity<{
[k in NoNeverKeys<T>]: k extends keyof T ? T[k] : never;
}>;
export type Extend<A extends SomeObject, B extends SomeObject> = Flatten<keyof
frontend/node_modules/zod/v4/core/util.d.ts (Line 57:2 - Line 78:7), frontend/node_modules/zod/src/v4/core/util.ts (Line 137:3 - Line 162:32)
keyof A & keyof B extends never ? A & B : {
[K in keyof A as K extends keyof B ? never : K]: A[K];
} & {
[K in keyof B]: B[K];
}>;
export type TupleItems = ReadonlyArray<schemas.SomeType>;
export type AnyFunc = (...args: any[]) => any;
export type IsProp<T, K extends keyof T> = T[K] extends AnyFunc ? never : K;
export type MaybeAsync<T> = T | Promise<T>;
export type KeyOf<T> = keyof OmitIndexSignature<T>;
export type OmitIndexSignature<T> = {
[K in keyof T as string extends K ? never : K extends string ? K : never]: T[K];
};
export type ExtractIndexSignature<T> = {
[K in keyof T as string extends K ? K : K extends string ? never : K]: T[K];
};
export type Keys<T extends object> = keyof OmitIndexSignature<T>;
export type SchemaClass<T extends schemas.SomeType> = {
new (def: T["_zod"]["def"]): T;
};
export type EnumValue = string | number;
export
frontend/node_modules/zod/v4/core/util.d.ts (Line 81:1 - Line 89:2), frontend/node_modules/zod/src/v4/core/util.ts (Line 164:2 - Line 171:2)
}>;
export type KeysEnum<T extends object> = ToEnum<Exclude<keyof T, symbol>>;
export type KeysArray<T extends object> = Flatten<(keyof T & string)[]>;
export type Literal = string | number | bigint | boolean | null | undefined;
export type LiteralArray = Array<Literal>;
export type Primitive = string | number | symbol | bigint | boolean | null | undefined;
export type PrimitiveArray = Array<Primitive>;
export type HasSize = {
size: number;
frontend/node_modules/zod/v4/core/util.d.ts (Line 100:1 - Line 108:7), frontend/node_modules/zod/src/v4/core/util.ts (Line 175:2 - Line 185:13)
};
export type SafeParseError<T> = {
success: false;
data?: never;
error: errors.$ZodError<T>;
};
export type PropValues = Record<string, Set<Primitive>>;
export type PrimitiveSet = Set<Primitive>;
export
frontend/node_modules/zod/v4/core/util.d.ts (Line 144:1 - Line 149:2), frontend/node_modules/zod/src/v4/core/util.ts (Line 435:1 - Line 446:37)
export type EmptyToNever<T> = keyof T extends never ? never : T;
export type Normalize<T> = T extends undefined ? never : T extends Record<any, any> ? Flatten<{
[k in keyof Omit<T, "error" | "message">]: T[k];
} & ("error" extends keyof T ? {
error?: Exclude<T["error"], string>;
}
frontend/node_modules/zod/v4/core/util.d.ts (Line 154:1 - Line 161:8), frontend/node_modules/zod/src/v4/core/util.ts (Line 516:1 - Line 524:6)
export type CleanKey<T extends PropertyKey> = T extends `?${infer K}` ? K : T extends `${infer K}?` ? K : T;
export type ToCleanMap<T extends schemas.$ZodLooseShape> = {
[k in keyof T]: k extends `?${infer K}` ? K : k extends `${infer K}?` ? K : k;
};
export type FromCleanMap<T extends schemas.$ZodLooseShape> = {
[k in keyof T as k extends `?${infer K}` ? K : k extends `${infer K}?` ? K : k]: k;
};
export declare
frontend/node_modules/zod/v4/core/util.d.cts (Line 4:16 - Line 183:2), frontend/node_modules/zod/v4/core/util.d.ts (Line 4:15 - Line 183:2)
;
export type JSONType = string | number | boolean | null | JSONType[] | {
[key: string]: JSONType;
};
export type JWTAlgorithm = "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "EdDSA" | (string & {});
export type IPVersion = "v4" | "v6";
export type MimeTypes = "application/json" | "application/xml" | "application/x-www-form-urlencoded" | "application/javascript" | "application/pdf" | "application/zip" | "application/vnd.ms-excel" | "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" | "application/msword" | "application/vnd.openxmlformats-officedocument.wordprocessingml.document" | "application/vnd.ms-powerpoint" | "application/vnd.openxmlformats-officedocument.presentationml.presentation" | "application/octet-stream" | "application/graphql" | "text/html" | "text/plain" | "text/css" | "text/javascript" | "text/csv" | "image/png" | "image/jpeg" | "image/gif" | "image/svg+xml" | "image/webp" | "audio/mpeg" | "audio/ogg" | "audio/wav" | "audio/webm" | "video/mp4" | "video/webm" | "video/ogg" | "font/woff" | "font/woff2" | "font/ttf" | "font/otf" | "multipart/form-data" | (string & {});
export type ParsedTypes = "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" | "file" | "date" | "array" | "map" | "set" | "nan" | "null" | "promise";
export type AssertEqual<T, U> = (<V>() => V extends T ? 1 : 2) extends <V>() => V extends U ? 1 : 2 ? true : false;
export type AssertNotEqual<T, U> = (<V>() => V extends T ? 1 : 2) extends <V>() => V extends U ? 1 : 2 ? false : true;
export type AssertExtends<T, U> = T extends U ? T : never;
export type IsAny<T> = 0 extends 1 & T ? true : false;
export type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
export type OmitKeys<T, K extends string> = Pick<T, Exclude<keyof T, K>>;
export type MakePartial<T, K extends keyof T> = Omit<T, K> & InexactPartial<Pick<T, K>>;
export type MakeRequired<T, K extends keyof T> = Omit<T, K> & Required<Pick<T, K>>;
export type Exactly<T, X> = T & Record<Exclude<keyof X, keyof T>, never>;
export type NoUndefined<T> = T extends undefined ? never : T;
export type Whatever = {} | undefined | null;
export type LoosePartial<T extends object> = InexactPartial<T> & {
[k: string]: unknown;
};
export type Mask<Keys extends PropertyKey> = {
[K in Keys]?: true;
};
export type Writeable<T> = {
-readonly [P in keyof T]: T[P];
} & {};
export type InexactPartial<T> = {
[P in keyof T]?: T[P] | undefined;
};
export type EmptyObject = Record<string, never>;
export type BuiltIn = (((...args: any[]) => any) | (new (...args: any[]) => any)) | {
readonly [Symbol.toStringTag]: string;
} | Date | Error | Generator | Promise<unknown> | RegExp;
export type MakeReadonly<T> = T extends Map<infer K, infer V> ? ReadonlyMap<K, V> : T extends Set<infer V> ? ReadonlySet<V> : T extends [infer Head, ...infer Tail] ? readonly [Head, ...Tail] : T extends Array<infer V> ? ReadonlyArray<V> : T extends BuiltIn ? T : Readonly<T>;
export type SomeObject = Record<PropertyKey, any>;
export type Identity<T> = T;
export type Flatten<T> = Identity<{
[k in keyof T]: T[k];
}>;
export type Mapped<T> = {
[k in keyof T]: T[k];
};
export type Prettify<T> = {
[K in keyof T]: T[K];
} & {};
export type NoNeverKeys<T> = {
[k in keyof T]: [T[k]] extends [never] ? never : k;
}[keyof T];
export type NoNever<T> = Identity<{
[k in NoNeverKeys<T>]: k extends keyof T ? T[k] : never;
}>;
export type Extend<A extends SomeObject, B extends SomeObject> = Flatten<keyof A & keyof B extends never ? A & B : {
[K in keyof A as K extends keyof B ? never : K]: A[K];
} & {
[K in keyof B]: B[K];
}>;
export type TupleItems = ReadonlyArray<schemas.SomeType>;
export type AnyFunc = (...args: any[]) => any;
export type IsProp<T, K extends keyof T> = T[K] extends AnyFunc ? never : K;
export type MaybeAsync<T> = T | Promise<T>;
export type KeyOf<T> = keyof OmitIndexSignature<T>;
export type OmitIndexSignature<T> = {
[K in keyof T as string extends K ? never : K extends string ? K : never]: T[K];
};
export type ExtractIndexSignature<T> = {
[K in keyof T as string extends K ? K : K extends string ? never : K]: T[K];
};
export type Keys<T extends object> = keyof OmitIndexSignature<T>;
export type SchemaClass<T extends schemas.SomeType> = {
new (def: T["_zod"]["def"]): T;
};
export type EnumValue = string | number;
export type EnumLike = Readonly<Record<string, EnumValue>>;
export type ToEnum<T extends EnumValue> = Flatten<{
[k in T]: k;
}>;
export type KeysEnum<T extends object> = ToEnum<Exclude<keyof T, symbol>>;
export type KeysArray<T extends object> = Flatten<(keyof T & string)[]>;
export type Literal = string | number | bigint | boolean | null | undefined;
export type LiteralArray = Array<Literal>;
export type Primitive = string | number | symbol | bigint | boolean | null | undefined;
export type PrimitiveArray = Array<Primitive>;
export type HasSize = {
size: number;
};
export type HasLength = {
length: number;
};
export type Numeric = number | bigint | Date;
export type SafeParseResult<T> = SafeParseSuccess<T> | SafeParseError<T>;
export type SafeParseSuccess<T> = {
success: true;
data: T;
error?: never;
};
export type SafeParseError<T> = {
success: false;
data?: never;
error: errors.$ZodError<T>;
};
export type PropValues = Record<string, Set<Primitive>>;
export type PrimitiveSet = Set<Primitive>;
export declare function assertEqual<A, B>(val: AssertEqual<A, B>): AssertEqual<A, B>;
export declare function assertNotEqual<A, B>(val: AssertNotEqual<A, B>): AssertNotEqual<A, B>;
export declare function assertIs<T>(_arg: T): void;
export declare function assertNever(_x: never): never;
export declare function assert<T>(_: any): asserts _ is T;
export declare function getEnumValues(entries: EnumLike): EnumValue[];
export declare function joinValues<T extends Primitive[]>(array: T, separator?: string): string;
export declare function jsonStringifyReplacer(_: string, value: any): any;
export declare function cached<T>(getter: () => T): {
value: T;
};
export declare function nullish(input: any): boolean;
export declare function cleanRegex(source: string): string;
export declare function floatSafeRemainder(val: number, step: number): number;
export declare function defineLazy<T, K extends keyof T>(object: T, key: K, getter: () => T[K]): void;
export declare function assignProp<T extends object, K extends PropertyKey>(target: T, prop: K, value: K extends keyof T ? T[K] : any): void;
export declare function getElementAtPath(obj: any, path: (string | number)[] | null | undefined): any;
export declare function promiseAllObject<T extends object>(promisesObj: T): Promise<{
[k in keyof T]: Awaited<T[k]>;
}>;
export declare function randomString(length?: number): string;
export declare function esc(str: string): string;
export declare const captureStackTrace: (targetObject: object, constructorOpt?: Function) => void;
export declare function isObject(data: any): data is Record<PropertyKey, unknown>;
export declare const allowsEval: {
value: boolean;
};
export declare function isPlainObject(o: any): o is Record<PropertyKey, unknown>;
export declare function numKeys(data: any): number;
export declare const getParsedType: (data: any) => ParsedTypes;
export declare const propertyKeyTypes: Set<string>;
export declare const primitiveTypes: Set<string>;
export declare function escapeRegex(str: string): string;
export declare function clone<T extends schemas.$ZodType>(inst: T, def?: T["_zod"]["def"], params?: {
parent: boolean;
}): T;
export type EmptyToNever<T> = keyof T extends never ? never : T;
export type Normalize<T> = T extends undefined ? never : T extends Record<any, any> ? Flatten<{
[k in keyof Omit<T, "error" | "message">]: T[k];
} & ("error" extends keyof T ? {
error?: Exclude<T["error"], string>;
} : unknown)> : never;
export declare function normalizeParams<T>(_params: T): Normalize<T>;
export declare function createTransparentProxy<T extends object>(getter: () => T): T;
export declare function stringifyPrimitive(value: any): string;
export declare function optionalKeys(shape: schemas.$ZodShape): string[];
export type CleanKey<T extends PropertyKey> = T extends `?${infer K}` ? K : T extends `${infer K}?` ? K : T;
export type ToCleanMap<T extends schemas.$ZodLooseShape> = {
[k in keyof T]: k extends `?${infer K}` ? K : k extends `${infer K}?` ? K : k;
};
export type FromCleanMap<T extends schemas.$ZodLooseShape> = {
[k in keyof T as k extends `?${infer K}` ? K : k extends `${infer K}?` ? K : k]: k;
};
export declare const NUMBER_FORMAT_RANGES: Record<checks.$ZodNumberFormats, [number, number]>;
export declare const BIGINT_FORMAT_RANGES: Record<checks.$ZodBigIntFormats, [bigint, bigint]>;
export declare function pick(schema: schemas.$ZodObject, mask: Record<string, unknown>): any;
export declare function omit(schema: schemas.$ZodObject, mask: object): any;
export declare function extend(schema: schemas.$ZodObject, shape: schemas.$ZodShape): any;
export declare function merge(a: schemas.$ZodObject, b: schemas.$ZodObject): any;
export declare function partial(Class: SchemaClass<schemas.$ZodOptional> | null, schema: schemas.$ZodObject, mask: object | undefined): any;
export declare function required(Class: SchemaClass<schemas.$ZodNonOptional>, schema: schemas.$ZodObject, mask: object | undefined): any;
export type Constructor<T, Def extends any[] = any[]> = new (...args: Def) => T;
export declare function aborted(x: schemas.ParsePayload, startIndex?: number): boolean;
export declare function prefixIssues(path: PropertyKey, issues: errors.$ZodRawIssue[]): errors.$ZodRawIssue[];
export declare function unwrapMessage(message: string | {
message: string;
} | undefined | null): string | undefined;
export declare function finalizeIssue(iss: errors.$ZodRawIssue, ctx: schemas.ParseContextInternal | undefined, config: $ZodConfig): errors.$ZodIssue;
export declare function getSizableOrigin(input: any): "set" | "map" | "file" | "unknown";
export declare function getLengthableOrigin(input: any): "array" | "string" | "unknown";
export declare function issue(_iss: string, input: any, inst: any): errors.$ZodRawIssue;
export declare function issue(_iss: errors.$ZodRawIssue): errors.$ZodRawIssue;
export declare function cleanEnum(obj: Record<string, EnumValue>): EnumValue[];
export declare abstract class Class {
constructor(..._args: any[]);
}
frontend/node_modules/zod/v4/core/to-json-schema.d.ts (Line 41:9 - Line 61:8), frontend/node_modules/zod/src/v4/core/to-json-schema.ts (Line 49:2 - Line 72:6)
}>;
uri?: ((id: string) => string) | undefined;
defs: Record<string, JSONSchema.BaseSchema>;
} | undefined;
}
interface Seen {
/** JSON Schema result for this Zod schema */
schema: JSONSchema.BaseSchema;
/** A cached version of the schema that doesn't get overwritten during ref resolution */
def?: JSONSchema.BaseSchema;
defId?: string | undefined;
/** Number of times this schema was encountered during traversal */
count: number;
/** Cycle path */
cycle?: (string | number)[] | undefined;
isParent?: boolean | undefined;
ref?: schemas.$ZodType | undefined | null;
/** JSON Schema property path for this schema */
path?: (string | number)[] | undefined;
}
export declare
frontend/node_modules/zod/v4/core/to-json-schema.d.ts (Line 61:2 - Line 71:2), frontend/node_modules/zod/src/v4/core/to-json-schema.ts (Line 72:2 - Line 83:2)
frontend/node_modules/zod/v4/core/to-json-schema.d.cts (Line 3:16 - Line 88:2), frontend/node_modules/zod/v4/core/to-json-schema.d.ts (Line 3:15 - Line 88:2)
;
interface JSONSchemaGeneratorParams {
/** A registry used to look up metadata for each schema. Any schema with an `id` property will be extracted as a $def.
* @default globalRegistry */
metadata?: $ZodRegistry<Record<string, any>>;
/** The JSON Schema version to target.
* - `"draft-2020-12"` — Default. JSON Schema Draft 2020-12
* - `"draft-7"` — JSON Schema Draft 7 */
target?: "draft-7" | "draft-2020-12";
/** How to handle unrepresentable types.
* - `"throw"` — Default. Unrepresentable types throw an error
* - `"any"` — Unrepresentable types become `{}` */
unrepresentable?: "throw" | "any";
/** Arbitrary custom logic that can be used to modify the generated JSON Schema. */
override?: (ctx: {
zodSchema: schemas.$ZodTypes;
jsonSchema: JSONSchema.BaseSchema;
path: (string | number)[];
}) => void;
/** Whether to extract the `"input"` or `"output"` type. Relevant to transforms, Error converting schema to JSONz, defaults, coerced primitives, etc.
* - `"output"` — Default. Convert the output schema.
* - `"input"` — Convert the input schema. */
io?: "input" | "output";
}
interface ProcessParams {
schemaPath: schemas.$ZodType[];
path: (string | number)[];
}
interface EmitParams {
/** How to handle cycles.
* - `"ref"` — Default. Cycles will be broken using $defs
* - `"throw"` — Cycles will throw an error if encountered */
cycles?: "ref" | "throw";
reused?: "ref" | "inline";
external?: {
/** */
registry: $ZodRegistry<{
id?: string | undefined;
}>;
uri?: ((id: string) => string) | undefined;
defs: Record<string, JSONSchema.BaseSchema>;
} | undefined;
}
interface Seen {
/** JSON Schema result for this Zod schema */
schema: JSONSchema.BaseSchema;
/** A cached version of the schema that doesn't get overwritten during ref resolution */
def?: JSONSchema.BaseSchema;
defId?: string | undefined;
/** Number of times this schema was encountered during traversal */
count: number;
/** Cycle path */
cycle?: (string | number)[] | undefined;
isParent?: boolean | undefined;
ref?: schemas.$ZodType | undefined | null;
/** JSON Schema property path for this schema */
path?: (string | number)[] | undefined;
}
export declare class JSONSchemaGenerator {
metadataRegistry: $ZodRegistry<Record<string, any>>;
target: "draft-7" | "draft-2020-12";
unrepresentable: "throw" | "any";
override: (ctx: {
zodSchema: schemas.$ZodTypes;
jsonSchema: JSONSchema.BaseSchema;
path: (string | number)[];
}) => void;
io: "input" | "output";
counter: number;
seen: Map<schemas.$ZodType, Seen>;
constructor(params?: JSONSchemaGeneratorParams);
process(schema: schemas.$ZodType, _params?: ProcessParams): JSONSchema.BaseSchema;
emit(schema: schemas.$ZodType, _params?: EmitParams): JSONSchema.BaseSchema;
}
interface ToJSONSchemaParams extends Omit<JSONSchemaGeneratorParams & EmitParams, "external"> {
}
interface RegistryToJSONSchemaParams extends Omit<JSONSchemaGeneratorParams & EmitParams, "external"> {
uri?: (id: string) => string;
}
export declare function toJSONSchema(schema: schemas.$ZodType, _params?: ToJSONSchemaParams): JSONSchema.BaseSchema;
export declare function toJSONSchema(registry: $ZodRegistry<{
id?: string | undefined;
}>, _params?: RegistryToJSONSchemaParams): {
schemas: Record<string, JSONSchema.BaseSchema>;
};
export {};
frontend/node_modules/zod/v4/core/standard-schema.d.ts (Line 8:5 - Line 19:5), frontend/node_modules/zod/src/v4/core/standard-schema.ts (Line 9:2 - Line 21:7)
interface Props<Input = unknown, Output = Input> {
/** The version number of the standard. */
readonly version: 1;
/** The vendor name of the schema library. */
readonly vendor: string;
/** Validates unknown input values. */
readonly validate: (value: unknown) => Result<Output> | Promise<Result<Output>>;
/** Inferred types associated with the schema. */
readonly types?: Types<Input, Output> | undefined;
}
/** The result interface of the validate function. */
type
frontend/node_modules/zod/v4/core/standard-schema.d.cts (Line 1:1 - Line 55:2), frontend/node_modules/zod/v4/core/standard-schema.d.ts (Line 1:1 - Line 55:2)
/** The Standard Schema interface. */
export interface StandardSchemaV1<Input = unknown, Output = Input> {
/** The Standard Schema properties. */
readonly "~standard": StandardSchemaV1.Props<Input, Output>;
}
export declare namespace StandardSchemaV1 {
/** The Standard Schema properties interface. */
interface Props<Input = unknown, Output = Input> {
/** The version number of the standard. */
readonly version: 1;
/** The vendor name of the schema library. */
readonly vendor: string;
/** Validates unknown input values. */
readonly validate: (value: unknown) => Result<Output> | Promise<Result<Output>>;
/** Inferred types associated with the schema. */
readonly types?: Types<Input, Output> | undefined;
}
/** The result interface of the validate function. */
type Result<Output> = SuccessResult<Output> | FailureResult;
/** The result interface if validation succeeds. */
interface SuccessResult<Output> {
/** The typed output value. */
readonly value: Output;
/** The non-existent issues. */
readonly issues?: undefined;
}
/** The result interface if validation fails. */
interface FailureResult {
/** The issues of failed validation. */
readonly issues: ReadonlyArray<Issue>;
}
/** The issue interface of the failure output. */
interface Issue {
/** The error message of the issue. */
readonly message: string;
/** The path of the issue, if any. */
readonly path?: ReadonlyArray<PropertyKey | PathSegment> | undefined;
}
/** The path segment interface of the issue. */
interface PathSegment {
/** The key representing a path segment. */
readonly key: PropertyKey;
}
/** The Standard Schema types interface. */
interface Types<Input = unknown, Output = Input> {
/** The input type of the schema. */
readonly input: Input;
/** The output type of the schema. */
readonly output: Output;
}
/** Infers the input type of a Standard Schema. */
type InferInput<Schema extends StandardSchemaV1> = NonNullable<Schema["~standard"]["types"]>["input"];
/** Infers the output type of a Standard Schema. */
type InferOutput<Schema extends StandardSchemaV1> = NonNullable<Schema["~standard"]["types"]>["output"];
}
frontend/node_modules/zod/v4/core/registries.d.cts (Line 2:16 - Line 35:2), frontend/node_modules/zod/v4/core/registries.d.ts (Line 2:15 - Line 35:2)
frontend/node_modules/zod/v4/core/index.d.ts (Line 1:1 - Line 15:2), frontend/node_modules/zod/src/v4/core/index.ts (Line 1:1 - Line 15:2)
export * from "./core.js";
export * from "./parse.js";
export * from "./errors.js";
export * from "./schemas.js";
export * from "./checks.js";
export * from "./versions.js";
export * as util from "./util.js";
export * as regexes from "./regexes.js";
export * as locales from "../locales/index.js";
export * from "./registries.js";
export * from "./doc.js";
export * from "./function.js";
export * from "./api.js";
export * from "./to-json-schema.js";
export * as JSONSchema from "./json-schema.js";
frontend/node_modules/zod/v4/core/function.d.ts (Line 5:16 - Line 17:8), frontend/node_modules/zod/src/v4/core/function.ts (Line 18:1 - Line 44:6)
frontend/node_modules/zod/v4/core/core.d.ts (Line 9:1 - Line 15:8), frontend/node_modules/zod/src/v4/core/core.ts (Line 6:2 - Line 13:6)
};
export interface $constructor<T extends ZodTrait, D = T["_zod"]["def"]> {
new (def: D): T;
init(inst: T, def: D): asserts inst is T;
}
/** A special constant with type `never` */
export declare
frontend/node_modules/zod/v4/core/core.d.cts (Line 3:13 - Line 49:2), frontend/node_modules/zod/v4/core/core.d.ts (Line 3:12 - Line 49:2)
;
type ZodTrait = {
_zod: {
def: any;
[k: string]: any;
};
};
export interface $constructor<T extends ZodTrait, D = T["_zod"]["def"]> {
new (def: D): T;
init(inst: T, def: D): asserts inst is T;
}
/** A special constant with type `never` */
export declare const NEVER: never;
export declare function $constructor<T extends ZodTrait, D = T["_zod"]["def"]>(name: string, initializer: (inst: T, def: D) => void, params?: {
Parent?: typeof Class;
}): $constructor<T, D>;
export declare const $brand: unique symbol;
export type $brand<T extends string | number | symbol = string | number | symbol> = {
[$brand]: {
[k in T]: true;
};
};
export type $ZodBranded<T extends schemas.SomeType, Brand extends string | number | symbol> = T & Record<"_zod", Record<"output", output<T> & $brand<Brand>>>;
export declare class $ZodAsyncError extends Error {
constructor();
}
export type input<T> = T extends {
_zod: {
input: any;
};
} ? Required<T["_zod"]>["input"] : unknown;
export type output<T> = T extends {
_zod: {
output: any;
};
} ? Required<T["_zod"]>["output"] : unknown;
export type { output as infer };
export interface $ZodConfig {
/** Custom error map. Overrides `config().localeError`. */
customError?: errors.$ZodErrorMap | undefined;
/** Localized error map. Lowest priority. */
localeError?: errors.$ZodErrorMap | undefined;
/** Disable JIT schema compilation. Useful in environments that disallow `eval`. */
jitless?: boolean | undefined;
}
export declare const globalConfig: $ZodConfig;
export declare function config(newConfig?: Partial<$ZodConfig>): $ZodConfig;
frontend/node_modules/zod/v4/core/checks.d.cts (Line 4:13 - Line 278:2), frontend/node_modules/zod/v4/core/checks.d.ts (Line 4:12 - Line 278:2)
frontend/node_modules/zod/v4/classic/errors.d.ts (Line 1:1 - Line 20:7), frontend/node_modules/zod/src/v4/classic/errors.ts (Line 1:1 - Line 24:6)
import * as core from "../core/index.js";
import { $ZodError } from "../core/index.js";
/** @deprecated Use `z.core.$ZodIssue` from `@zod/core` instead, especially if you are building a library on top of Zod. */
export type ZodIssue = core.$ZodIssue;
/** An Error-like class used to store Zod validation issues. */
export interface ZodError<T = unknown> extends $ZodError<T> {
/** @deprecated Use the `z.treeifyError(err)` function instead. */
format(): core.$ZodFormattedError<T>;
format<U>(mapper: (issue: core.$ZodIssue) => U): core.$ZodFormattedError<T, U>;
/** @deprecated Use the `z.treeifyError(err)` function instead. */
flatten(): core.$ZodFlattenedError<T>;
flatten<U>(mapper: (issue: core.$ZodIssue) => U): core.$ZodFlattenedError<T, U>;
/** @deprecated Push directly to `.issues` instead. */
addIssue(issue: core.$ZodIssue): void;
/** @deprecated Push directly to `.issues` instead. */
addIssues(issues: core.$ZodIssue[]): void;
/** @deprecated Check `err.issues.length === 0` instead. */
isEmpty: boolean;
}
export
frontend/node_modules/zod/v4/classic/errors.d.cts (Line 2:20 - Line 28:20), frontend/node_modules/zod/src/v4/classic/errors.ts (Line 2:19 - Line 28:19)
;
/** @deprecated Use `z.core.$ZodIssue` from `@zod/core` instead, especially if you are building a library on top of Zod. */
export type ZodIssue = core.$ZodIssue;
/** An Error-like class used to store Zod validation issues. */
export interface ZodError<T = unknown> extends $ZodError<T> {
/** @deprecated Use the `z.treeifyError(err)` function instead. */
format(): core.$ZodFormattedError<T>;
format<U>(mapper: (issue: core.$ZodIssue) => U): core.$ZodFormattedError<T, U>;
/** @deprecated Use the `z.treeifyError(err)` function instead. */
flatten(): core.$ZodFlattenedError<T>;
flatten<U>(mapper: (issue: core.$ZodIssue) => U): core.$ZodFlattenedError<T, U>;
/** @deprecated Push directly to `.issues` instead. */
addIssue(issue: core.$ZodIssue): void;
/** @deprecated Push directly to `.issues` instead. */
addIssues(issues: core.$ZodIssue[]): void;
/** @deprecated Check `err.issues.length === 0` instead. */
isEmpty: boolean;
}
export declare const ZodError: core.$constructor<ZodError>;
export declare const ZodRealError: core.$constructor<ZodError>;
export type {
/** @deprecated Use `z.core.$ZodFlattenedError` instead. */
$ZodFlattenedError as ZodFlattenedError,
/** @deprecated Use `z.core.$ZodFormattedError` instead. */
$ZodFormattedError as ZodFormattedError,
/** @deprecated Use `z.core.$ZodErrorMap` instead. */
$ZodErrorMap as ZodErrorMap, } from "../core/index.cjs"
frontend/node_modules/zod/v4/classic/compat.d.ts (Line 23:2 - Line 31:2), frontend/node_modules/zod/src/v4/classic/compat.ts (Line 28:6 - Line 41:2)
;
/** @deprecated Use `z.$ZodFlattenedError` */
export type inferFlattenedErrors<T extends core.$ZodType, U = string> = core.$ZodFlattenedError<core.output<T>, U>;
/** @deprecated Use `z.$ZodFormattedError` */
export type inferFormattedError<T extends core.$ZodType<any, any>, U = string> = core.$ZodFormattedError<core.output<T>, U>;
/** Use `z.$brand` instead */
export type BRAND<T extends string | number | symbol = string | number | symbol> = {
[core.$brand]: {
[k in T]: true;
frontend/node_modules/zod/v4/classic/compat.d.cts (Line 9:20 - Line 34:20), frontend/node_modules/zod/v4/classic/compat.d.ts (Line 9:19 - Line 34:19)
;
/** @deprecated Use the raw string literal codes instead, e.g. "invalid_type". */
export declare const ZodIssueCode: {
readonly invalid_type: "invalid_type";
readonly too_big: "too_big";
readonly too_small: "too_small";
readonly invalid_format: "invalid_format";
readonly not_multiple_of: "not_multiple_of";
readonly unrecognized_keys: "unrecognized_keys";
readonly invalid_union: "invalid_union";
readonly invalid_key: "invalid_key";
readonly invalid_element: "invalid_element";
readonly invalid_value: "invalid_value";
readonly custom: "custom";
};
/** @deprecated Use `z.$ZodFlattenedError` */
export type inferFlattenedErrors<T extends core.$ZodType, U = string> = core.$ZodFlattenedError<core.output<T>, U>;
/** @deprecated Use `z.$ZodFormattedError` */
export type inferFormattedError<T extends core.$ZodType<any, any>, U = string> = core.$ZodFormattedError<core.output<T>, U>;
/** Use `z.$brand` instead */
export type BRAND<T extends string | number | symbol = string | number | symbol> = {
[core.$brand]: {
[k in T]: true;
};
};
export { $brand, config } from "../core/index.cjs"
frontend/node_modules/zod/v4/classic/compat.d.cts (Line 34:20 - Line 46:2), frontend/node_modules/zod/v4/classic/compat.d.ts (Line 34:19 - Line 46:2)
;
/** @deprecated Use `z.config(params)` instead. */
export declare function setErrorMap(map: core.$ZodErrorMap): void;
/** @deprecated Use `z.config()` instead. */
export declare function getErrorMap(): core.$ZodErrorMap<core.$ZodIssue> | undefined;
export type {
/** @deprecated Use z.ZodType (without generics) instead. */
ZodType as ZodTypeAny,
/** @deprecated Use `z.ZodType` */
ZodType as ZodSchema,
/** @deprecated Use `z.ZodType` */
ZodType as Schema, };
export type ZodRawShape = core.$ZodShape;
frontend/node_modules/zod/v4/classic/coerce.d.cts (Line 2:16 - Line 17:2), frontend/node_modules/zod/v4/classic/coerce.d.ts (Line 2:15 - Line 17:2)
frontend/node_modules/zod/v3/helpers/enumUtil.d.ts (Line 1:2 - Line 7:7), frontend/node_modules/zod/src/v3/helpers/enumUtil.ts (Line 1:2 - Line 17:2)
namespace enumUtil {
type UnionToIntersectionFn<T> = (T extends unknown ? (k: () => T) => void : never) extends (k: infer Intersection) => void ? Intersection : never;
type GetUnionLast<T> = UnionToIntersectionFn<T> extends () => infer Last ? Last : never;
type UnionToTuple<T, Tuple extends unknown[] = []> = [T] extends [never] ? Tuple : UnionToTuple<Exclude<T, GetUnionLast<T>>, [GetUnionLast<T>, ...Tuple]>;
type CastToStringTuple<T> = T extends [string, ...string[]] ? T : never;
export type UnionToTupleString<T> = CastToStringTuple<UnionToTuple<T>>;
export
frontend/node_modules/zod/v3/helpers/enumUtil.d.cts (Line 1:1 - Line 8:2), frontend/node_modules/zod/v3/helpers/enumUtil.d.ts (Line 1:1 - Line 8:2)
export declare namespace enumUtil {
type UnionToIntersectionFn<T> = (T extends unknown ? (k: () => T) => void : never) extends (k: infer Intersection) => void ? Intersection : never;
type GetUnionLast<T> = UnionToIntersectionFn<T> extends () => infer Last ? Last : never;
type UnionToTuple<T, Tuple extends unknown[] = []> = [T] extends [never] ? Tuple : UnionToTuple<Exclude<T, GetUnionLast<T>>, [GetUnionLast<T>, ...Tuple]>;
type CastToStringTuple<T> = T extends [string, ...string[]] ? T : never;
export type UnionToTupleString<T> = CastToStringTuple<UnionToTuple<T>>;
export {};
}
frontend/node_modules/zod/src/v3/ZodError.ts (Line 231:15 - Line 243:33), frontend/node_modules/zod/src/v4/core/errors.ts (Line 271:2 - Line 283:2)
);
} else if (issue.path.length === 0) {
(fieldErrors as any)._errors.push(mapper(issue));
} else {
let curr: any = fieldErrors;
let i = 0;
while (i < issue.path.length) {
const el = issue.path[i]!;
const terminal = i === issue.path.length - 1;
if (!terminal) {
curr[el] = curr[el] || { _errors: [] };
// if (typeof el === "string") {
frontend/node_modules/zod/src/v3/ZodError.ts (Line 250:13 - Line 262:5), frontend/node_modules/zod/src/v4/core/errors.ts (Line 283:11 - Line 294:6)
frontend/node_modules/@vitejs/plugin-react/dist/index.d.cts (Line 2:7 - Line 67:2), frontend/node_modules/@vitejs/plugin-react/dist/index.d.ts (Line 2:14 - Line 67:2)
;
//#region src/index.d.ts
interface Options {
include?: string | RegExp | Array<string | RegExp>;
exclude?: string | RegExp | Array<string | RegExp>;
/**
* Control where the JSX factory is imported from.
* https://esbuild.github.io/api/#jsx-import-source
* @default 'react'
*/
jsxImportSource?: string;
/**
* Note: Skipping React import with classic runtime is not supported from v4
* @default "automatic"
*/
jsxRuntime?: 'classic' | 'automatic';
/**
* Babel configuration applied in both dev and prod.
*/
babel?: BabelOptions | ((id: string, options: {
ssr?: boolean;
}) => BabelOptions);
/**
* React Fast Refresh runtime URL prefix.
* Useful in a module federation context to enable HMR by specifying
* the host application URL in the Vite config of a remote application.
* @example
* reactRefreshHost: 'http://localhost:3000'
*/
reactRefreshHost?: string;
/**
* If set, disables the recommendation to use `@vitejs/plugin-react-oxc`
*/
disableOxcRecommendation?: boolean;
}
type BabelOptions = Omit<TransformOptions, 'ast' | 'filename' | 'root' | 'sourceFileName' | 'sourceMaps' | 'inputSourceMap'>;
/**
* The object type used by the `options` passed to plugins with
* an `api.reactBabel` method.
*/
interface ReactBabelOptions extends BabelOptions {
plugins: Extract<BabelOptions['plugins'], any[]>;
presets: Extract<BabelOptions['presets'], any[]>;
overrides: Extract<BabelOptions['overrides'], any[]>;
parserOpts: ParserOptions & {
plugins: Extract<ParserOptions['plugins'], any[]>;
};
}
type ReactBabelHook = (babelConfig: ReactBabelOptions, context: ReactBabelHookContext, config: ResolvedConfig) => void;
type ReactBabelHookContext = {
ssr: boolean;
id: string;
};
type ViteReactPluginApi = {
/**
* Manipulate the Babel options of `@vitejs/plugin-react`
*/
reactBabel?: ReactBabelHook;
};
declare function viteReact(opts?: Options): Plugin[];
declare namespace viteReact {
var preambleCode: string;
}
//#endregion
export { BabelOptions, Options, ReactBabelOptions, ViteReactPluginApi, viteReact as default };
frontend/node_modules/@tanstack/react-query/src/useSuspenseQueries.ts (Line 32:11 - Line 38:94), frontend/node_modules/@tanstack/react-query/build/modern/useSuspenseQueries.d.ts (Line 16:2 - Line 16:2)
T extends [infer TQueryFnData, infer TError, infer TData]
? UseSuspenseQueryOptions<TQueryFnData, TError, TData>
: T extends [infer TQueryFnData, infer TError]
? UseSuspenseQueryOptions<TQueryFnData, TError>
: T extends [infer TQueryFnData]
? UseSuspenseQueryOptions<TQueryFnData>
: // Part 3: responsible for inferring and enforcing type if no explicit parameter was provided
frontend/node_modules/@tanstack/react-query/src/useSuspenseQueries.ts (Line 114:1 - Line 128:110), frontend/node_modules/@tanstack/react-query/build/modern/useSuspenseQueries.d.ts (Line 45:2 - Line 53:2)
> = TDepth['length'] extends MAXIMUM_DEPTH
? Array<UseSuspenseQueryOptions>
: T extends []
? []
: T extends [infer Head]
? [...TResults, GetUseSuspenseQueryOptions<Head>]
: T extends [infer Head, ...infer Tails]
? SuspenseQueriesOptions<
[...Tails],
[...TResults, GetUseSuspenseQueryOptions<Head>],
[...TDepth, 1]
>
: Array<unknown> extends T
? T
: // If T is *some* array but we couldn't assign unknown[] to it, then it must hold some known/homogenous type!
frontend/node_modules/@tanstack/react-query/src/useSuspenseQueries.ts (Line 151:1 - Line 163:2), frontend/node_modules/@tanstack/react-query/build/modern/useSuspenseQueries.d.ts (Line 57:2 - Line 66:2)
frontend/node_modules/@tanstack/react-query/src/useQueries.ts (Line 74:11 - Line 80:94), frontend/node_modules/@tanstack/react-query/build/modern/useQueries.d.ts (Line 19:2 - Line 19:2)
T extends [infer TQueryFnData, infer TError, infer TData]
? UseQueryOptionsForUseQueries<TQueryFnData, TError, TData>
: T extends [infer TQueryFnData, infer TError]
? UseQueryOptionsForUseQueries<TQueryFnData, TError>
: T extends [infer TQueryFnData]
? UseQueryOptionsForUseQueries<TQueryFnData>
: // Part 3: responsible for inferring and enforcing type if no explicit parameter was provided
frontend/node_modules/@tanstack/react-query/src/useQueries.ts (Line 100:1 - Line 114:5), frontend/node_modules/@tanstack/react-query/build/modern/useQueries.d.ts (Line 26:1 - Line 26:2)
frontend/node_modules/@tanstack/react-query/src/useQueries.ts (Line 123:11 - Line 129:99), frontend/node_modules/@tanstack/react-query/build/modern/useQueries.d.ts (Line 37:2 - Line 37:2)
T extends [any, infer TError, infer TData]
? GetDefinedOrUndefinedQueryResult<T, TData, TError>
: T extends [infer TQueryFnData, infer TError]
? GetDefinedOrUndefinedQueryResult<T, TQueryFnData, TError>
: T extends [infer TQueryFnData]
? GetDefinedOrUndefinedQueryResult<T, TQueryFnData>
: // Part 3: responsible for mapping inferred type to results, if no explicit parameter was provided
frontend/node_modules/@tanstack/react-query/src/useQueries.ts (Line 152:1 - Line 166:110), frontend/node_modules/@tanstack/react-query/build/modern/useQueries.d.ts (Line 45:2 - Line 53:2)
> = TDepth['length'] extends MAXIMUM_DEPTH
? Array<UseQueryOptionsForUseQueries>
: T extends []
? []
: T extends [infer Head]
? [...TResults, GetUseQueryOptionsForUseQueries<Head>]
: T extends [infer Head, ...infer Tails]
? QueriesOptions<
[...Tails],
[...TResults, GetUseQueryOptionsForUseQueries<Head>],
[...TDepth, 1]
>
: ReadonlyArray<unknown> extends T
? T
: // If T is *some* array but we couldn't assign unknown[] to it, then it must hold some known/homogenous type!
frontend/node_modules/@tanstack/react-query/src/useQueries.ts (Line 194:1 - Line 206:2), frontend/node_modules/@tanstack/react-query/build/modern/useQueries.d.ts (Line 57:2 - Line 66:2)
frontend/node_modules/zustand/middleware/redux.d.ts (Line 1:1 - Line 21:2), frontend/node_modules/zustand/esm/middleware/redux.d.ts (Line 1:1 - Line 30:2)
import type { StateCreator, StoreMutatorIdentifier } from '../vanilla';
type Write<T, U> = Omit<T, keyof U> & U;
type Action = {
type: string;
};
type StoreRedux<A> = {
dispatch: (a: A) => A;
dispatchFromDevtools: true;
};
type ReduxState<A> = {
dispatch: StoreRedux<A>['dispatch'];
};
type WithRedux<S, A> = Write<S, StoreRedux<A>>;
type Redux = <T, A extends Action, Cms extends [StoreMutatorIdentifier, unknown][] = []>(reducer: (state: T, action: A) => T, initialState: T) => StateCreator<Write<T, ReduxState<A>>, Cms, [['zustand/redux', A]]>;
declare module '../vanilla' {
interface StoreMutators<S, A> {
'zustand/redux': WithRedux<S, A>;
}
}
export declare const redux: Redux;
export {};
frontend/node_modules/zustand/middleware/persist.d.ts (Line 1:1 - Line 119:2), frontend/node_modules/zustand/esm/middleware/persist.d.ts (Line 1:1 - Line 119:2)
import type { StateCreator, StoreMutatorIdentifier } from '../vanilla';
export interface StateStorage {
getItem: (name: string) => string | null | Promise<string | null>;
setItem: (name: string, value: string) => unknown | Promise<unknown>;
removeItem: (name: string) => unknown | Promise<unknown>;
}
export type StorageValue<S> = {
state: S;
version?: number;
};
export interface PersistStorage<S> {
getItem: (name: string) => StorageValue<S> | null | Promise<StorageValue<S> | null>;
setItem: (name: string, value: StorageValue<S>) => unknown | Promise<unknown>;
removeItem: (name: string) => unknown | Promise<unknown>;
}
type JsonStorageOptions = {
reviver?: (key: string, value: unknown) => unknown;
replacer?: (key: string, value: unknown) => unknown;
};
export declare function createJSONStorage<S>(getStorage: () => StateStorage, options?: JsonStorageOptions): PersistStorage<S> | undefined;
export interface PersistOptions<S, PersistedState = S> {
/** Name of the storage (must be unique) */
name: string;
/**
* @deprecated Use `storage` instead.
* A function returning a storage.
* The storage must fit `window.localStorage`'s api (or an async version of it).
* For example the storage could be `AsyncStorage` from React Native.
*
* @default () => localStorage
*/
getStorage?: () => StateStorage;
/**
* @deprecated Use `storage` instead.
* Use a custom serializer.
* The returned string will be stored in the storage.
*
* @default JSON.stringify
*/
serialize?: (state: StorageValue<S>) => string | Promise<string>;
/**
* @deprecated Use `storage` instead.
* Use a custom deserializer.
* Must return an object matching StorageValue<S>
*
* @param str The storage's current value.
* @default JSON.parse
*/
deserialize?: (str: string) => StorageValue<PersistedState> | Promise<StorageValue<PersistedState>>;
/**
* Use a custom persist storage.
*
* Combining `createJSONStorage` helps creating a persist storage
* with JSON.parse and JSON.stringify.
*
* @default createJSONStorage(() => localStorage)
*/
storage?: PersistStorage<PersistedState> | undefined;
/**
* Filter the persisted value.
*
* @params state The state's value
*/
partialize?: (state: S) => PersistedState;
/**
* A function returning another (optional) function.
* The main function will be called before the state rehydration.
* The returned function will be called after the state rehydration or when an error occurred.
*/
onRehydrateStorage?: (state: S) => ((state?: S, error?: unknown) => void) | void;
/**
* If the stored state's version mismatch the one specified here, the storage will not be used.
* This is useful when adding a breaking change to your store.
*/
version?: number;
/**
* A function to perform persisted state migration.
* This function will be called when persisted state versions mismatch with the one specified here.
*/
migrate?: (persistedState: unknown, version: number) => PersistedState | Promise<PersistedState>;
/**
* A function to perform custom hydration merges when combining the stored state with the current one.
* By default, this function does a shallow merge.
*/
merge?: (persistedState: unknown, currentState: S) => S;
/**
* An optional boolean that will prevent the persist middleware from triggering hydration on initialization,
* This allows you to call `rehydrate()` at a specific point in your apps rendering life-cycle.
*
* This is useful in SSR application.
*
* @default false
*/
skipHydration?: boolean;
}
type PersistListener<S> = (state: S) => void;
type StorePersist<S, Ps> = {
persist: {
setOptions: (options: Partial<PersistOptions<S, Ps>>) => void;
clearStorage: () => void;
rehydrate: () => Promise<void> | void;
hasHydrated: () => boolean;
onHydrate: (fn: PersistListener<S>) => () => void;
onFinishHydration: (fn: PersistListener<S>) => () => void;
getOptions: () => Partial<PersistOptions<S, Ps>>;
};
};
type Persist = <T, Mps extends [StoreMutatorIdentifier, unknown][] = [], Mcs extends [StoreMutatorIdentifier, unknown][] = [], U = T>(initializer: StateCreator<T, [...Mps, ['zustand/persist', unknown]], Mcs>, options: PersistOptions<T, U>) => StateCreator<T, Mps, [['zustand/persist', U], ...Mcs]>;
declare module '../vanilla' {
interface StoreMutators<S, A> {
'zustand/persist': WithPersist<S, A>;
}
}
type Write<T, U> = Omit<T, keyof U> & U;
type WithPersist<S, A> = S extends {
getState: () => infer T;
} ? Write<S, StorePersist<T, A>> : never;
export declare const persist: Persist;
export {};
frontend/node_modules/zustand/middleware/immer.d.ts (Line 1:1 - Line 25:2), frontend/node_modules/zustand/esm/middleware/immer.d.ts (Line 1:1 - Line 60:2)
import type { Draft } from 'immer';
import type { StateCreator, StoreMutatorIdentifier } from '../vanilla';
type Immer = <T, Mps extends [StoreMutatorIdentifier, unknown][] = [], Mcs extends [StoreMutatorIdentifier, unknown][] = []>(initializer: StateCreator<T, [...Mps, ['zustand/immer', never]], Mcs>) => StateCreator<T, Mps, [['zustand/immer', never], ...Mcs]>;
declare module '../vanilla' {
interface StoreMutators<S, A> {
['zustand/immer']: WithImmer<S>;
}
}
type Write<T, U> = Omit<T, keyof U> & U;
type SkipTwo<T> = T extends {
length: 0;
} ? [] : T extends {
length: 1;
} ? [] : T extends {
length: 0 | 1;
} ? [] : T extends [unknown, unknown, ...infer A] ? A : T extends [unknown, unknown?, ...infer A] ? A : T extends [unknown?, unknown?, ...infer A] ? A : never;
type WithImmer<S> = Write<S, StoreImmer<S>>;
type StoreImmer<S> = S extends {
getState: () => infer T;
setState: infer SetState;
} ? SetState extends (...a: infer A) => infer Sr ? {
setState(nextStateOrUpdater: T | Partial<T> | ((state: Draft<T>) => void), shouldReplace?: boolean | undefined, ...a: SkipTwo<A>): Sr;
} : never : never;
export declare const immer: Immer;
export {};
frontend/node_modules/zustand/middleware/devtools.d.ts (Line 1:1 - Line 49:2), frontend/node_modules/zustand/esm/middleware/devtools.d.ts (Line 1:1 - Line 102:2)
import type { StateCreator, StoreApi, StoreMutatorIdentifier } from '../vanilla';
type Config = Parameters<(Window extends {
__REDUX_DEVTOOLS_EXTENSION__?: infer T;
} ? T : {
connect: (param: any) => any;
})['connect']>[0];
declare module '../vanilla' {
interface StoreMutators<S, A> {
'zustand/devtools': WithDevtools<S>;
}
}
type Cast<T, U> = T extends U ? T : U;
type Write<T, U> = Omit<T, keyof U> & U;
type TakeTwo<T> = T extends {
length: 0;
} ? [undefined, undefined] : T extends {
length: 1;
} ? [...a0: Cast<T, unknown[]>, a1: undefined] : T extends {
length: 0 | 1;
} ? [...a0: Cast<T, unknown[]>, a1: undefined] : T extends {
length: 2;
} ? T : T extends {
length: 1 | 2;
} ? T : T extends {
length: 0 | 1 | 2;
} ? T : T extends [infer A0, infer A1, ...unknown[]] ? [A0, A1] : T extends [infer A0, (infer A1)?, ...unknown[]] ? [A0, A1?] : T extends [(infer A0)?, (infer A1)?, ...unknown[]] ? [A0?, A1?] : never;
type WithDevtools<S> = Write<S, StoreDevtools<S>>;
type StoreDevtools<S> = S extends {
setState: (...a: infer Sa) => infer Sr;
} ? {
setState<A extends string | {
type: string;
}>(...a: [...a: TakeTwo<Sa>, action?: A]): Sr;
} : never;
export interface DevtoolsOptions extends Config {
name?: string;
enabled?: boolean;
anonymousActionType?: string;
store?: string;
}
type Devtools = <T, Mps extends [StoreMutatorIdentifier, unknown][] = [], Mcs extends [StoreMutatorIdentifier, unknown][] = []>(initializer: StateCreator<T, [...Mps, ['zustand/devtools', never]], Mcs>, devtoolsOptions?: DevtoolsOptions) => StateCreator<T, Mps, [['zustand/devtools', never], ...Mcs]>;
declare module '../vanilla' {
interface StoreMutators<S, A> {
'zustand/devtools': WithDevtools<S>;
}
}
export type NamedSet<T> = WithDevtools<StoreApi<T>>['setState'];
export declare const devtools: Devtools;
export {};
frontend/node_modules/zustand/esm/vanilla.d.ts (Line 1:1 - Line 13:8), frontend/node_modules/zustand/ts3.4/esm/vanilla.d.ts (Line 1:1 - Line 13:8)
type SetStateInternal<T> = {
_(partial: T | Partial<T> | {
_(state: T): T | Partial<T>;
}['_'], replace?: boolean | undefined): void;
}['_'];
export interface StoreApi<T> {
setState: SetStateInternal<T>;
getState: () => T;
getInitialState: () => T;
subscribe: (listener: (state: T, prevState: T) => void) => () => void;
/**
* @deprecated Use `unsubscribe` returned by `subscribe`
*/
frontend/node_modules/zustand/esm/vanilla.d.ts (Line 14:5 - Line 31:4), frontend/node_modules/zustand/ts3.4/esm/vanilla.d.ts (Line 14:5 - Line 56:4)
destroy: () => void;
}
type Get<T, K, F> = K extends keyof T ? T[K] : F;
export type Mutate<S, Ms> = number extends Ms['length' & keyof Ms] ? S : Ms extends [] ? S : Ms extends [[infer Mi, infer Ma], ...infer Mrs] ? Mutate<StoreMutators<S, Ma>[Mi & StoreMutatorIdentifier], Mrs> : never;
export type StateCreator<T, Mis extends [StoreMutatorIdentifier, unknown][] = [], Mos extends [StoreMutatorIdentifier, unknown][] = [], U = T> = ((setState: Get<Mutate<StoreApi<T>, Mis>, 'setState', never>, getState: Get<Mutate<StoreApi<T>, Mis>, 'getState', never>, store: Mutate<StoreApi<T>, Mis>) => U) & {
$$storeMutators?: Mos;
};
export interface StoreMutators<S, A> {
}
export type StoreMutatorIdentifier = keyof StoreMutators<unknown, unknown>;
type CreateStore = {
<T, Mos extends [StoreMutatorIdentifier, unknown][] = []>(initializer: StateCreator<T, [], Mos>): Mutate<StoreApi<T>, Mos>;
<T>(): <Mos extends [StoreMutatorIdentifier, unknown][] = []>(initializer: StateCreator<T, [], Mos>) => Mutate<StoreApi<T>, Mos>;
};
export declare const createStore: CreateStore;
/**
* @deprecated Use `import { createStore } from 'zustand/vanilla'`
*/
frontend/node_modules/zustand/esm/vanilla.d.ts (Line 68:1 - Line 76:4), frontend/node_modules/zustand/ts3.4/esm/vanilla.d.ts (Line 93:1 - Line 101:4)
export type SetState<T extends State> = {
_(partial: T | Partial<T> | {
_(state: T): T | Partial<T>;
}['_'], replace?: boolean | undefined): void;
}['_'];
/**
* @deprecated You might be looking for `StateCreator`, if not then
* use `StoreApi<T>['getState']` instead of `GetState<T>`.
*/
frontend/node_modules/zustand/esm/vanilla.d.mts (Line 1:1 - Line 81:2), frontend/node_modules/zustand/ts3.4/esm/vanilla.d.ts (Line 1:1 - Line 81:2)
type SetStateInternal<T> = {
_(partial: T | Partial<T> | {
_(state: T): T | Partial<T>;
}['_'], replace?: boolean | undefined): void;
}['_'];
export interface StoreApi<T> {
setState: SetStateInternal<T>;
getState: () => T;
getInitialState: () => T;
subscribe: (listener: (state: T, prevState: T) => void) => () => void;
/**
* @deprecated Use `unsubscribe` returned by `subscribe`
*/
destroy: () => void;
}
type Get<T, K, F> = K extends keyof T ? T[K] : F;
export type Mutate<S, Ms> = number extends Ms['length' & keyof Ms] ? S : Ms extends [] ? S : Ms extends [[infer Mi, infer Ma], ...infer Mrs] ? Mutate<StoreMutators<S, Ma>[Mi & StoreMutatorIdentifier], Mrs> : never;
export type StateCreator<T, Mis extends [StoreMutatorIdentifier, unknown][] = [], Mos extends [StoreMutatorIdentifier, unknown][] = [], U = T> = ((setState: Get<Mutate<StoreApi<T>, Mis>, 'setState', never>, getState: Get<Mutate<StoreApi<T>, Mis>, 'getState', never>, store: Mutate<StoreApi<T>, Mis>) => U) & {
$$storeMutators?: Mos;
};
export interface StoreMutators<S, A> {
}
export type StoreMutatorIdentifier = keyof StoreMutators<unknown, unknown>;
type CreateStore = {
<T, Mos extends [StoreMutatorIdentifier, unknown][] = []>(initializer: StateCreator<T, [], Mos>): Mutate<StoreApi<T>, Mos>;
<T>(): <Mos extends [StoreMutatorIdentifier, unknown][] = []>(initializer: StateCreator<T, [], Mos>) => Mutate<StoreApi<T>, Mos>;
};
export declare const createStore: CreateStore;
/**
* @deprecated Use `import { createStore } from 'zustand/vanilla'`
*/
declare const _default: CreateStore;
export default _default;
/**
* @deprecated Use `unknown` instead of `State`
*/
export type State = unknown;
/**
* @deprecated Use `Partial<T> | ((s: T) => Partial<T>)` instead of `PartialState<T>`
*/
export type PartialState<T extends State> = Partial<T> | ((state: T) => Partial<T>);
/**
* @deprecated Use `(s: T) => U` instead of `StateSelector<T, U>`
*/
export type StateSelector<T extends State, U> = (state: T) => U;
/**
* @deprecated Use `(a: T, b: T) => boolean` instead of `EqualityChecker<T>`
*/
export type EqualityChecker<T> = (state: T, newState: T) => boolean;
/**
* @deprecated Use `(state: T, previousState: T) => void` instead of `StateListener<T>`
*/
export type StateListener<T> = (state: T, previousState: T) => void;
/**
* @deprecated Use `(slice: T, previousSlice: T) => void` instead of `StateSliceListener<T>`.
*/
export type StateSliceListener<T> = (slice: T, previousSlice: T) => void;
/**
* @deprecated Use `(listener: (state: T) => void) => void` instead of `Subscribe<T>`.
*/
export type Subscribe<T extends State> = {
(listener: (state: T, previousState: T) => void): () => void;
};
/**
* @deprecated You might be looking for `StateCreator`, if not then
* use `StoreApi<T>['setState']` instead of `SetState<T>`.
*/
export type SetState<T extends State> = {
_(partial: T | Partial<T> | {
_(state: T): T | Partial<T>;
}['_'], replace?: boolean | undefined): void;
}['_'];
/**
* @deprecated You might be looking for `StateCreator`, if not then
* use `StoreApi<T>['getState']` instead of `GetState<T>`.
*/
export type GetState<T extends State> = () => T;
/**
* @deprecated Use `StoreApi<T>['destroy']` instead of `Destroy`.
*/
export type Destroy = () => void;
frontend/node_modules/zustand/esm/traditional.d.ts (Line 1:2 - Line 21:2), frontend/node_modules/zustand/ts3.4/esm/traditional.d.ts (Line 1:2 - Line 31:2)
{ Mutate, StateCreator, StoreApi, StoreMutatorIdentifier } from './vanilla';
type ExtractState<S> = S extends {
getState: () => infer T;
} ? T : never;
type ReadonlyStoreApi<T> = Pick<StoreApi<T>, 'getState' | 'getInitialState' | 'subscribe'>;
type WithReact<S extends ReadonlyStoreApi<unknown>> = S & {
/** @deprecated please use api.getInitialState() */
getServerState?: () => ExtractState<S>;
};
export declare function useStoreWithEqualityFn<S extends WithReact<ReadonlyStoreApi<unknown>>>(api: S): ExtractState<S>;
export declare function useStoreWithEqualityFn<S extends WithReact<ReadonlyStoreApi<unknown>>, U>(api: S, selector: (state: ExtractState<S>) => U, equalityFn?: (a: U, b: U) => boolean): U;
export type UseBoundStoreWithEqualityFn<S extends WithReact<ReadonlyStoreApi<unknown>>> = {
(): ExtractState<S>;
<U>(selector: (state: ExtractState<S>) => U, equalityFn?: (a: U, b: U) => boolean): U;
} & S;
type CreateWithEqualityFn = {
<T, Mos extends [StoreMutatorIdentifier, unknown][] = []>(initializer: StateCreator<T, [], Mos>, defaultEqualityFn?: <U>(a: U, b: U) => boolean): UseBoundStoreWithEqualityFn<Mutate<StoreApi<T>, Mos>>;
<T>(): <Mos extends [StoreMutatorIdentifier, unknown][] = []>(initializer: StateCreator<T, [], Mos>, defaultEqualityFn?: <U>(a: U, b: U) => boolean) => UseBoundStoreWithEqualityFn<Mutate<StoreApi<T>, Mos>>;
};
export declare const createWithEqualityFn: CreateWithEqualityFn;
export {};
frontend/node_modules/zustand/esm/traditional.d.mts (Line 1:16 - Line 21:2), frontend/node_modules/zustand/ts3.4/esm/traditional.d.ts (Line 1:12 - Line 31:2)
;
type ExtractState<S> = S extends {
getState: () => infer T;
} ? T : never;
type ReadonlyStoreApi<T> = Pick<StoreApi<T>, 'getState' | 'getInitialState' | 'subscribe'>;
type WithReact<S extends ReadonlyStoreApi<unknown>> = S & {
/** @deprecated please use api.getInitialState() */
getServerState?: () => ExtractState<S>;
};
export declare function useStoreWithEqualityFn<S extends WithReact<ReadonlyStoreApi<unknown>>>(api: S): ExtractState<S>;
export declare function useStoreWithEqualityFn<S extends WithReact<ReadonlyStoreApi<unknown>>, U>(api: S, selector: (state: ExtractState<S>) => U, equalityFn?: (a: U, b: U) => boolean): U;
export type UseBoundStoreWithEqualityFn<S extends WithReact<ReadonlyStoreApi<unknown>>> = {
(): ExtractState<S>;
<U>(selector: (state: ExtractState<S>) => U, equalityFn?: (a: U, b: U) => boolean): U;
} & S;
type CreateWithEqualityFn = {
<T, Mos extends [StoreMutatorIdentifier, unknown][] = []>(initializer: StateCreator<T, [], Mos>, defaultEqualityFn?: <U>(a: U, b: U) => boolean): UseBoundStoreWithEqualityFn<Mutate<StoreApi<T>, Mos>>;
<T>(): <Mos extends [StoreMutatorIdentifier, unknown][] = []>(initializer: StateCreator<T, [], Mos>, defaultEqualityFn?: <U>(a: U, b: U) => boolean) => UseBoundStoreWithEqualityFn<Mutate<StoreApi<T>, Mos>>;
};
export declare const createWithEqualityFn: CreateWithEqualityFn;
export {};
frontend/node_modules/zustand/esm/react.d.ts (Line 1:1 - Line 15:4), frontend/node_modules/zustand/esm/traditional.d.ts (Line 1:1 - Line 15:4)
import type { Mutate, StateCreator, StoreApi, StoreMutatorIdentifier } from './vanilla';
type ExtractState<S> = S extends {
getState: () => infer T;
} ? T : never;
type ReadonlyStoreApi<T> = Pick<StoreApi<T>, 'getState' | 'getInitialState' | 'subscribe'>;
type WithReact<S extends ReadonlyStoreApi<unknown>> = S & {
/** @deprecated please use api.getInitialState() */
getServerState?: () => ExtractState<S>;
};
export declare function useStore<S extends WithReact<ReadonlyStoreApi<unknown>>>(api: S): ExtractState<S>;
export declare function useStore<S extends WithReact<ReadonlyStoreApi<unknown>>, U>(api: S, selector: (state: ExtractState<S>) => U): U;
/**
* @deprecated The usage with three arguments is deprecated. Use `useStoreWithEqualityFn` from 'zustand/traditional'. The usage with one or two arguments is not deprecated.
* https://github.com/pmndrs/zustand/discussions/1937
*/
frontend/node_modules/zustand/esm/react.d.ts (Line 16:1 - Line 22:8), frontend/node_modules/zustand/ts3.4/esm/react.d.ts (Line 16:1 - Line 22:8)
export declare function useStore<S extends WithReact<ReadonlyStoreApi<unknown>>, U>(api: S, selector: (state: ExtractState<S>) => U, equalityFn: ((a: U, b: U) => boolean) | undefined): U;
export type UseBoundStore<S extends WithReact<ReadonlyStoreApi<unknown>>> = {
(): ExtractState<S>;
<U>(selector: (state: ExtractState<S>) => U): U;
/**
* @deprecated Use `createWithEqualityFn` from 'zustand/traditional'
*/
frontend/node_modules/zustand/esm/react.d.ts (Line 23:5 - Line 30:8), frontend/node_modules/zustand/ts3.4/esm/react.d.ts (Line 23:5 - Line 40:8)
<U>(selector: (state: ExtractState<S>) => U, equalityFn: (a: U, b: U) => boolean): U;
} & S;
type Create = {
<T, Mos extends [StoreMutatorIdentifier, unknown][] = []>(initializer: StateCreator<T, [], Mos>): UseBoundStore<Mutate<StoreApi<T>, Mos>>;
<T>(): <Mos extends [StoreMutatorIdentifier, unknown][] = []>(initializer: StateCreator<T, [], Mos>) => UseBoundStore<Mutate<StoreApi<T>, Mos>>;
/**
* @deprecated Use `useStore` hook to bind store
*/
frontend/node_modules/zustand/esm/react.d.mts (Line 1:1 - Line 38:2), frontend/node_modules/zustand/esm/traditional.d.mts (Line 1:1 - Line 38:2)
import type { Mutate, StateCreator, StoreApi, StoreMutatorIdentifier } from './vanilla.mjs';
type ExtractState<S> = S extends {
getState: () => infer T;
} ? T : never;
type ReadonlyStoreApi<T> = Pick<StoreApi<T>, 'getState' | 'getInitialState' | 'subscribe'>;
type WithReact<S extends ReadonlyStoreApi<unknown>> = S & {
/** @deprecated please use api.getInitialState() */
getServerState?: () => ExtractState<S>;
};
export declare function useStore<S extends WithReact<ReadonlyStoreApi<unknown>>>(api: S): ExtractState<S>;
export declare function useStore<S extends WithReact<ReadonlyStoreApi<unknown>>, U>(api: S, selector: (state: ExtractState<S>) => U): U;
/**
* @deprecated The usage with three arguments is deprecated. Use `useStoreWithEqualityFn` from 'zustand/traditional'. The usage with one or two arguments is not deprecated.
* https://github.com/pmndrs/zustand/discussions/1937
*/
export declare function useStore<S extends WithReact<ReadonlyStoreApi<unknown>>, U>(api: S, selector: (state: ExtractState<S>) => U, equalityFn: ((a: U, b: U) => boolean) | undefined): U;
export type UseBoundStore<S extends WithReact<ReadonlyStoreApi<unknown>>> = {
(): ExtractState<S>;
<U>(selector: (state: ExtractState<S>) => U): U;
/**
* @deprecated Use `createWithEqualityFn` from 'zustand/traditional'
*/
<U>(selector: (state: ExtractState<S>) => U, equalityFn: (a: U, b: U) => boolean): U;
} & S;
type Create = {
<T, Mos extends [StoreMutatorIdentifier, unknown][] = []>(initializer: StateCreator<T, [], Mos>): UseBoundStore<Mutate<StoreApi<T>, Mos>>;
<T>(): <Mos extends [StoreMutatorIdentifier, unknown][] = []>(initializer: StateCreator<T, [], Mos>) => UseBoundStore<Mutate<StoreApi<T>, Mos>>;
/**
* @deprecated Use `useStore` hook to bind store
*/
<S extends StoreApi<unknown>>(store: S): UseBoundStore<S>;
};
export declare const create: Create;
/**
* @deprecated Use `import { create } from 'zustand'`
*/
declare const _default: Create;
export default _default;
frontend/node_modules/zustand/esm/context.d.ts (Line 3:2 - Line 16:4), frontend/node_modules/zustand/ts3.4/esm/context.d.ts (Line 3:2 - Line 16:4)
{ StoreApi } from 'zustand';
type UseContextStore<S extends StoreApi<unknown>> = {
(): ExtractState<S>;
<U>(selector: (state: ExtractState<S>) => U, equalityFn?: (a: U, b: U) => boolean): U;
};
type ExtractState<S> = S extends {
getState: () => infer T;
} ? T : never;
type WithoutCallSignature<T> = {
[K in keyof T]: T[K];
};
/**
* @deprecated Use `createStore` and `useStore` for context usage
*/
frontend/node_modules/zustand/esm/context.d.ts (Line 17:1 - Line 25:2), frontend/node_modules/zustand/ts3.4/esm/context.d.ts (Line 17:1 - Line 25:2)
frontend/node_modules/zustand/esm/context.d.mts (Line 1:1 - Line 25:2), frontend/node_modules/zustand/esm/context.d.ts (Line 1:1 - Line 25:2)
import ReactExports from 'react';
import type { ReactNode } from 'react';
import type { StoreApi } from 'zustand';
type UseContextStore<S extends StoreApi<unknown>> = {
(): ExtractState<S>;
<U>(selector: (state: ExtractState<S>) => U, equalityFn?: (a: U, b: U) => boolean): U;
};
type ExtractState<S> = S extends {
getState: () => infer T;
} ? T : never;
type WithoutCallSignature<T> = {
[K in keyof T]: T[K];
};
/**
* @deprecated Use `createStore` and `useStore` for context usage
*/
declare function createContext<S extends StoreApi<unknown>>(): {
Provider: ({ createStore, children, }: {
createStore: () => S;
children: ReactNode;
}) => ReactExports.FunctionComponentElement<ReactExports.ProviderProps<S | undefined>>;
useStore: UseContextStore<S>;
useStoreApi: () => WithoutCallSignature<S>;
};
export default createContext;
frontend/node_modules/zod/v3/standard-schema.d.cts (Line 1:1 - Line 102:2), frontend/node_modules/zod/v3/standard-schema.d.ts (Line 1:1 - Line 102:2)
/**
* The Standard Schema interface.
*/
export type StandardSchemaV1<Input = unknown, Output = Input> = {
/**
* The Standard Schema properties.
*/
readonly "~standard": StandardSchemaV1.Props<Input, Output>;
};
export declare namespace StandardSchemaV1 {
/**
* The Standard Schema properties interface.
*/
export interface Props<Input = unknown, Output = Input> {
/**
* The version number of the standard.
*/
readonly version: 1;
/**
* The vendor name of the schema library.
*/
readonly vendor: string;
/**
* Validates unknown input values.
*/
readonly validate: (value: unknown) => Result<Output> | Promise<Result<Output>>;
/**
* Inferred types associated with the schema.
*/
readonly types?: Types<Input, Output> | undefined;
}
/**
* The result interface of the validate function.
*/
export type Result<Output> = SuccessResult<Output> | FailureResult;
/**
* The result interface if validation succeeds.
*/
export interface SuccessResult<Output> {
/**
* The typed output value.
*/
readonly value: Output;
/**
* The non-existent issues.
*/
readonly issues?: undefined;
}
/**
* The result interface if validation fails.
*/
export interface FailureResult {
/**
* The issues of failed validation.
*/
readonly issues: ReadonlyArray<Issue>;
}
/**
* The issue interface of the failure output.
*/
export interface Issue {
/**
* The error message of the issue.
*/
readonly message: string;
/**
* The path of the issue, if any.
*/
readonly path?: ReadonlyArray<PropertyKey | PathSegment> | undefined;
}
/**
* The path segment interface of the issue.
*/
export interface PathSegment {
/**
* The key representing a path segment.
*/
readonly key: PropertyKey;
}
/**
* The Standard Schema types interface.
*/
export interface Types<Input = unknown, Output = Input> {
/**
* The input type of the schema.
*/
readonly input: Input;
/**
* The output type of the schema.
*/
readonly output: Output;
}
/**
* Infers the input type of a Standard Schema.
*/
export type InferInput<Schema extends StandardSchemaV1> = NonNullable<Schema["~standard"]["types"]>["input"];
/**
* Infers the output type of a Standard Schema.
*/
export type InferOutput<Schema extends StandardSchemaV1> = NonNullable<Schema["~standard"]["types"]>["output"];
export {};
}
frontend/node_modules/zod/v3/ZodError.d.ts (Line 1:1 - Line 12:8), frontend/node_modules/zod/src/v3/ZodError.ts (Line 1:1 - Line 15:6)
import type { Primitive } from "./helpers/typeAliases.js";
import { util, type ZodParsedType } from "./helpers/util.js";
import type { TypeOf, ZodType } from "./index.js";
type allKeys<T> = T extends any ? keyof T : never;
export type inferFlattenedErrors<T extends ZodType<any, any, any>, U = string> = typeToFlattenedError<TypeOf<T>, U>;
export type typeToFlattenedError<T, U = string> = {
formErrors: U[];
fieldErrors: {
[P in allKeys<T>]?: U[];
};
};
export declare
frontend/node_modules/zod/v3/ZodError.d.ts (Line 29:2 - Line 73:8), frontend/node_modules/zod/src/v3/ZodError.ts (Line 32:2 - Line 89:2)
frontend/node_modules/@remix-run/router/index.ts (Line 92:1 - Line 106:2), frontend/node_modules/@remix-run/router/dist/index.d.ts (Line 6:1 - Line 9:2)
/** @internal */
export type { RouteManifest as UNSAFE_RouteManifest } from "./utils";
export {
DeferredData as UNSAFE_DeferredData,
ErrorResponseImpl as UNSAFE_ErrorResponseImpl,
convertRoutesToDataRoutes as UNSAFE_convertRoutesToDataRoutes,
convertRouteMatchToUiMatch as UNSAFE_convertRouteMatchToUiMatch,
decodePath as UNSAFE_decodePath,
getResolveToMatches as UNSAFE_getResolveToMatches,
} from "./utils";
export {
invariant as UNSAFE_invariant,
warning as UNSAFE_warning,
} from "./history";
frontend/src/types/team.ts (Line 34:1 - Line 49:16), backend/src/services/memberService.ts (Line 9:1 - Line 24:2)
frontend/node_modules/zustand/vanilla.d.ts (Line 1:1 - Line 81:2), frontend/node_modules/zustand/ts3.4/esm/vanilla.d.ts (Line 1:1 - Line 81:2)
type SetStateInternal<T> = {
_(partial: T | Partial<T> | {
_(state: T): T | Partial<T>;
}['_'], replace?: boolean | undefined): void;
}['_'];
export interface StoreApi<T> {
setState: SetStateInternal<T>;
getState: () => T;
getInitialState: () => T;
subscribe: (listener: (state: T, prevState: T) => void) => () => void;
/**
* @deprecated Use `unsubscribe` returned by `subscribe`
*/
destroy: () => void;
}
type Get<T, K, F> = K extends keyof T ? T[K] : F;
export type Mutate<S, Ms> = number extends Ms['length' & keyof Ms] ? S : Ms extends [] ? S : Ms extends [[infer Mi, infer Ma], ...infer Mrs] ? Mutate<StoreMutators<S, Ma>[Mi & StoreMutatorIdentifier], Mrs> : never;
export type StateCreator<T, Mis extends [StoreMutatorIdentifier, unknown][] = [], Mos extends [StoreMutatorIdentifier, unknown][] = [], U = T> = ((setState: Get<Mutate<StoreApi<T>, Mis>, 'setState', never>, getState: Get<Mutate<StoreApi<T>, Mis>, 'getState', never>, store: Mutate<StoreApi<T>, Mis>) => U) & {
$$storeMutators?: Mos;
};
export interface StoreMutators<S, A> {
}
export type StoreMutatorIdentifier = keyof StoreMutators<unknown, unknown>;
type CreateStore = {
<T, Mos extends [StoreMutatorIdentifier, unknown][] = []>(initializer: StateCreator<T, [], Mos>): Mutate<StoreApi<T>, Mos>;
<T>(): <Mos extends [StoreMutatorIdentifier, unknown][] = []>(initializer: StateCreator<T, [], Mos>) => Mutate<StoreApi<T>, Mos>;
};
export declare const createStore: CreateStore;
/**
* @deprecated Use `import { createStore } from 'zustand/vanilla'`
*/
declare const _default: CreateStore;
export default _default;
/**
* @deprecated Use `unknown` instead of `State`
*/
export type State = unknown;
/**
* @deprecated Use `Partial<T> | ((s: T) => Partial<T>)` instead of `PartialState<T>`
*/
export type PartialState<T extends State> = Partial<T> | ((state: T) => Partial<T>);
/**
* @deprecated Use `(s: T) => U` instead of `StateSelector<T, U>`
*/
export type StateSelector<T extends State, U> = (state: T) => U;
/**
* @deprecated Use `(a: T, b: T) => boolean` instead of `EqualityChecker<T>`
*/
export type EqualityChecker<T> = (state: T, newState: T) => boolean;
/**
* @deprecated Use `(state: T, previousState: T) => void` instead of `StateListener<T>`
*/
export type StateListener<T> = (state: T, previousState: T) => void;
/**
* @deprecated Use `(slice: T, previousSlice: T) => void` instead of `StateSliceListener<T>`.
*/
export type StateSliceListener<T> = (slice: T, previousSlice: T) => void;
/**
* @deprecated Use `(listener: (state: T) => void) => void` instead of `Subscribe<T>`.
*/
export type Subscribe<T extends State> = {
(listener: (state: T, previousState: T) => void): () => void;
};
/**
* @deprecated You might be looking for `StateCreator`, if not then
* use `StoreApi<T>['setState']` instead of `SetState<T>`.
*/
export type SetState<T extends State> = {
_(partial: T | Partial<T> | {
_(state: T): T | Partial<T>;
}['_'], replace?: boolean | undefined): void;
}['_'];
/**
* @deprecated You might be looking for `StateCreator`, if not then
* use `StoreApi<T>['getState']` instead of `GetState<T>`.
*/
export type GetState<T extends State> = () => T;
/**
* @deprecated Use `StoreApi<T>['destroy']` instead of `Destroy`.
*/
export type Destroy = () => void;
frontend/node_modules/zustand/traditional.d.ts (Line 1:1 - Line 21:2), frontend/node_modules/zustand/esm/traditional.d.ts (Line 1:1 - Line 31:2)
import type { Mutate, StateCreator, StoreApi, StoreMutatorIdentifier } from './vanilla';
type ExtractState<S> = S extends {
getState: () => infer T;
} ? T : never;
type ReadonlyStoreApi<T> = Pick<StoreApi<T>, 'getState' | 'getInitialState' | 'subscribe'>;
type WithReact<S extends ReadonlyStoreApi<unknown>> = S & {
/** @deprecated please use api.getInitialState() */
getServerState?: () => ExtractState<S>;
};
export declare function useStoreWithEqualityFn<S extends WithReact<ReadonlyStoreApi<unknown>>>(api: S): ExtractState<S>;
export declare function useStoreWithEqualityFn<S extends WithReact<ReadonlyStoreApi<unknown>>, U>(api: S, selector: (state: ExtractState<S>) => U, equalityFn?: (a: U, b: U) => boolean): U;
export type UseBoundStoreWithEqualityFn<S extends WithReact<ReadonlyStoreApi<unknown>>> = {
(): ExtractState<S>;
<U>(selector: (state: ExtractState<S>) => U, equalityFn?: (a: U, b: U) => boolean): U;
} & S;
type CreateWithEqualityFn = {
<T, Mos extends [StoreMutatorIdentifier, unknown][] = []>(initializer: StateCreator<T, [], Mos>, defaultEqualityFn?: <U>(a: U, b: U) => boolean): UseBoundStoreWithEqualityFn<Mutate<StoreApi<T>, Mos>>;
<T>(): <Mos extends [StoreMutatorIdentifier, unknown][] = []>(initializer: StateCreator<T, [], Mos>, defaultEqualityFn?: <U>(a: U, b: U) => boolean) => UseBoundStoreWithEqualityFn<Mutate<StoreApi<T>, Mos>>;
};
export declare const createWithEqualityFn: CreateWithEqualityFn;
export {};
frontend/node_modules/zustand/react.d.ts (Line 1:1 - Line 38:2), frontend/node_modules/zustand/esm/traditional.d.ts (Line 1:1 - Line 38:2)
import type { Mutate, StateCreator, StoreApi, StoreMutatorIdentifier } from './vanilla';
type ExtractState<S> = S extends {
getState: () => infer T;
} ? T : never;
type ReadonlyStoreApi<T> = Pick<StoreApi<T>, 'getState' | 'getInitialState' | 'subscribe'>;
type WithReact<S extends ReadonlyStoreApi<unknown>> = S & {
/** @deprecated please use api.getInitialState() */
getServerState?: () => ExtractState<S>;
};
export declare function useStore<S extends WithReact<ReadonlyStoreApi<unknown>>>(api: S): ExtractState<S>;
export declare function useStore<S extends WithReact<ReadonlyStoreApi<unknown>>, U>(api: S, selector: (state: ExtractState<S>) => U): U;
/**
* @deprecated The usage with three arguments is deprecated. Use `useStoreWithEqualityFn` from 'zustand/traditional'. The usage with one or two arguments is not deprecated.
* https://github.com/pmndrs/zustand/discussions/1937
*/
export declare function useStore<S extends WithReact<ReadonlyStoreApi<unknown>>, U>(api: S, selector: (state: ExtractState<S>) => U, equalityFn: ((a: U, b: U) => boolean) | undefined): U;
export type UseBoundStore<S extends WithReact<ReadonlyStoreApi<unknown>>> = {
(): ExtractState<S>;
<U>(selector: (state: ExtractState<S>) => U): U;
/**
* @deprecated Use `createWithEqualityFn` from 'zustand/traditional'
*/
<U>(selector: (state: ExtractState<S>) => U, equalityFn: (a: U, b: U) => boolean): U;
} & S;
type Create = {
<T, Mos extends [StoreMutatorIdentifier, unknown][] = []>(initializer: StateCreator<T, [], Mos>): UseBoundStore<Mutate<StoreApi<T>, Mos>>;
<T>(): <Mos extends [StoreMutatorIdentifier, unknown][] = []>(initializer: StateCreator<T, [], Mos>) => UseBoundStore<Mutate<StoreApi<T>, Mos>>;
/**
* @deprecated Use `useStore` hook to bind store
*/
<S extends StoreApi<unknown>>(store: S): UseBoundStore<S>;
};
export declare const create: Create;
/**
* @deprecated Use `import { create } from 'zustand'`
*/
declare const _default: Create;
export default _default;
frontend/node_modules/zustand/context.d.ts (Line 1:1 - Line 25:2), frontend/node_modules/zustand/esm/context.d.ts (Line 1:1 - Line 25:2)
import ReactExports from 'react';
import type { ReactNode } from 'react';
import type { StoreApi } from 'zustand';
type UseContextStore<S extends StoreApi<unknown>> = {
(): ExtractState<S>;
<U>(selector: (state: ExtractState<S>) => U, equalityFn?: (a: U, b: U) => boolean): U;
};
type ExtractState<S> = S extends {
getState: () => infer T;
} ? T : never;
type WithoutCallSignature<T> = {
[K in keyof T]: T[K];
};
/**
* @deprecated Use `createStore` and `useStore` for context usage
*/
declare function createContext<S extends StoreApi<unknown>>(): {
Provider: ({ createStore, children, }: {
createStore: () => S;
children: ReactNode;
}) => ReactExports.FunctionComponentElement<ReactExports.ProviderProps<S | undefined>>;
useStore: UseContextStore<S>;
useStoreApi: () => WithoutCallSignature<S>;
};
export default createContext;
frontend/node_modules/react-router-dom/server.d.ts (Line 1:1 - Line 31:2), frontend/node_modules/react-router-dom/dist/server.d.ts (Line 1:1 - Line 31:2)
import * as React from "react";
import type { Router as RemixRouter, StaticHandlerContext, CreateStaticHandlerOptions as RouterCreateStaticHandlerOptions, FutureConfig as RouterFutureConfig } from "@remix-run/router";
import type { FutureConfig, Location, RouteObject } from "react-router-dom";
export interface StaticRouterProps {
basename?: string;
children?: React.ReactNode;
location: Partial<Location> | string;
future?: Partial<FutureConfig>;
}
/**
* A `<Router>` that may not navigate to any other location. This is useful
* on the server where there is no stateful UI.
*/
export declare function StaticRouter({ basename, children, location: locationProp, future, }: StaticRouterProps): React.JSX.Element;
export { StaticHandlerContext };
export interface StaticRouterProviderProps {
context: StaticHandlerContext;
router: RemixRouter;
hydrate?: boolean;
nonce?: string;
}
/**
* A Data Router that may not navigate to any other location. This is useful
* on the server where there is no stateful UI.
*/
export declare function StaticRouterProvider({ context, router, hydrate, nonce, }: StaticRouterProviderProps): React.JSX.Element;
type CreateStaticHandlerOptions = Omit<RouterCreateStaticHandlerOptions, "detectErrorBoundary" | "mapRouteProperties">;
export declare function createStaticHandler(routes: RouteObject[], opts?: CreateStaticHandlerOptions): import("@remix-run/router").StaticHandler;
export declare function createStaticRouter(routes: RouteObject[], context: StaticHandlerContext, opts?: {
future?: Partial<Pick<RouterFutureConfig, "v7_partialHydration" | "v7_relativeSplatPath">>;
}): RemixRouter;
javascript
backend/dist/database/seeds/001_sample_data.js (Line 1:1 - Line 9:23), backend/dist/database/seeds/004_comprehensive_demo_data.js (Line 1:1 - Line 9:66)
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.seed = seed;
const bcryptjs_1 = __importDefault(require("bcryptjs"));
async function seed(knex) {
// Clear existing data
backend/dist/database/seeds/001_sample_data.js (Line 10:19 - Line 16:23), backend/dist/database/seeds/004_comprehensive_demo_data.js (Line 39:15 - Line 45:8)
backend/dist/services/teamService.js (Line 233:16 - Line 240:9), backend/dist/services/teamService.js (Line 48:8 - Line 55:13)
(teamId, userId) {
// Verify user is a team member
await this.verifyTeamMembership(teamId, userId);
const team = await (0, database_1.db)('teams')
.where('id', teamId)
.first();
if (!team) {
throw errorHelpers_1.ErrorFactory.notFound
backend/dist/services/prdService.js (Line 98:7 - Line 106:25), backend/dist/services/prdService.js (Line 59:8 - Line 67:23)
) {
const prd = await this.getPRD(prdId, userId);
// Verify ownership or team admin permissions
if (prd.user_id !== userId) {
if (prd.team_id) {
await teamService_1.teamService['verifyTeamPermission'](prd.team_id, userId, ['owner', 'admin']);
}
else {
throw errorHelpers_1.ErrorFactory.forbidden('Cannot delete this PRD'
backend/dist/services/prdService.js (Line 175:19 - Line 185:18), backend/dist/services/prdService.js (Line 128:14 - Line 138:13)
backend/dist/services/memberService.js (Line 1:1 - Line 6:14), backend/dist/database/seeds/004_comprehensive_demo_data.js (Line 1:1 - Line 6:5)
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.memberService
backend/dist/services/memberService.js (Line 132:51 - Line 141:38), backend/dist/services/memberService.js (Line 102:51 - Line 111:38)
);
}
const invitation = await (0, database_1.db)('team_invitations')
.where({ id: invitationId, team_id: teamId })
.first();
if (!invitation) {
throw errorHelpers_1.ErrorFactory.notFound('Invitation not found');
}
if (invitation.status !== 'pending') {
throw errorHelpers_1.ErrorFactory.validation('Can only cancel pending invitations'
backend/dist/services/memberService.js (Line 162:9 - Line 172:27), backend/dist/services/teamService.js (Line 140:9 - Line 150:37)
const member = await (0, database_1.db)('team_members')
.where({ team_id: teamId, user_id: memberId })
.first();
if (!member) {
throw errorHelpers_1.ErrorFactory.notFound('Team member not found');
}
// Can't change your own role
if (adminId === memberId) {
throw errorHelpers_1.ErrorFactory.forbidden('Cannot change your own role');
}
// Can't change owner role
backend/dist/services/memberService.js (Line 201:9 - Line 215:6), backend/dist/services/teamService.js (Line 175:9 - Line 189:33)
const member = await (0, database_1.db)('team_members')
.where({ team_id: teamId, user_id: memberId })
.first();
if (!member) {
throw errorHelpers_1.ErrorFactory.notFound('Team member not found');
}
// Can't remove yourself
if (adminId === memberId) {
throw errorHelpers_1.ErrorFactory.forbidden('Cannot remove yourself from the team');
}
// Can't remove owner
if (member.role === 'owner') {
throw errorHelpers_1.ErrorFactory.forbidden('Cannot remove team owner');
}
const
backend/dist/services/memberService.js (Line 230:2 - Line 236:2), backend/dist/services/teamService.js (Line 200:2 - Line 208:23)
);
// If this was their current team, switch to another team or null
const user = await trx('users').where('id', memberId).first();
if (user && user.current_team_id === teamId) {
const otherTeam = await trx('team_members')
.join('teams', 'team_members.team_id', 'teams.id')
.where({
backend/dist/services/memberService.js (Line 269:3 - Line 276:2), backend/dist/services/teamService.js (Line 360:7 - Line 367:7)
) {
const member = await (0, database_1.db)('team_members')
.where({ team_id: teamId, user_id: userId })
.first();
if (!member) {
throw errorHelpers_1.ErrorFactory.forbidden('Not a team member');
}
return (
backend/dist/services/memberService.js (Line 306:27 - Line 313:15), backend/dist/services/teamService.js (Line 360:21 - Line 276:23)
(teamId, userId) {
const member = await (0, database_1.db)('team_members')
.where({ team_id: teamId, user_id: userId })
.first();
if (!member) {
throw errorHelpers_1.ErrorFactory.forbidden('Not a team member');
}
return (0, database_1.db)('team_members'
backend/dist/services/marketplaceService.js (Line 104:16 - Line 114:51), backend/dist/services/publicGalleryService.js (Line 91:16 - Line 101:6)
, 'desc');
break;
}
// Get total count
const totalQuery = query.clone().clearSelect().clearOrder().count('* as total');
const totalResult = await totalQuery.first();
const total = parseInt(totalResult?.total) || 0;
// Apply pagination
const offset = (page - 1) * limit;
const results = await query.limit(limit).offset(offset);
// Get creator stats and reviews for each template
backend/dist/services/marketplaceService.js (Line 152:2 - Line 168:17), backend/dist/services/marketplaceService.js (Line 44:2 - Line 60:12)
(0, database_1.db)('marketplace_templates as mt')
.leftJoin('prd_templates as pt', 'mt.template_id', 'pt.id')
.leftJoin('users as u', 'mt.creator_id', 'u.id')
.select([
'mt.*',
'pt.name as template_name',
'pt.description as template_description',
'pt.industry as template_industry',
'pt.complexity_level',
'pt.tags as template_tags',
'pt.sections',
'pt.content',
'u.name as creator_name',
'u.avatar_url as creator_avatar',
'u.bio as creator_bio'
])
.where('mt.template_id'
backend/dist/services/blogService.js (Line 91:18 - Line 101:6), backend/dist/services/publicGalleryService.js (Line 91:16 - Line 101:5)
frontend/node_modules/sucrase/node_modules/minimatch/dist/esm/ast.js (Line 242:2 - Line 272:14), frontend/node_modules/sucrase/node_modules/minimatch/dist/esm/ast.js (Line 195:4 - Line 225:2)
;
let acc = '';
while (i < str.length) {
const c = str.charAt(i++);
// still accumulate escapes at this point, but we do ignore
// starts that are escaped
if (escaping || c === '\\') {
escaping = !escaping;
acc += c;
continue;
}
if (inBrace) {
if (i === braceStart + 1) {
if (c === '^' || c === '!') {
braceNeg = true;
}
}
else if (c === ']' && !(i === braceStart + 2 && braceNeg)) {
inBrace = false;
}
acc += c;
continue;
}
else if (c === '[') {
inBrace = true;
braceStart = i;
braceNeg = false;
acc += c;
continue;
}
if (isExtglobType
frontend/node_modules/sucrase/node_modules/minimatch/dist/commonjs/brace-expressions.js (Line 6:1 - Line 36:6), frontend/node_modules/sucrase/node_modules/minimatch/dist/esm/brace-expressions.js (Line 3:1 - Line 33:7)
// { <posix class>: [<translation>, /u flag required, negated]
const posixClasses = {
'[:alnum:]': ['\\p{L}\\p{Nl}\\p{Nd}', true],
'[:alpha:]': ['\\p{L}\\p{Nl}', true],
'[:ascii:]': ['\\x' + '00-\\x' + '7f', false],
'[:blank:]': ['\\p{Zs}\\t', true],
'[:cntrl:]': ['\\p{Cc}', true],
'[:digit:]': ['\\p{Nd}', true],
'[:graph:]': ['\\p{Z}\\p{C}', true, true],
'[:lower:]': ['\\p{Ll}', true],
'[:print:]': ['\\p{C}', true],
'[:punct:]': ['\\p{P}', true],
'[:space:]': ['\\p{Z}\\t\\r\\n\\v\\f', true],
'[:upper:]': ['\\p{Lu}', true],
'[:word:]': ['\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}', true],
'[:xdigit:]': ['A-Fa-f0-9', false],
};
// only need to escape a few things inside of brace expressions
// escapes: [ \ ] -
const braceEscape = (s) => s.replace(/[[\]\\-]/g, '\\$&');
// escape all regexp magic characters
const regexpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
// everything has already been escaped, we just have to join
const rangesToString = (ranges) => ranges.join('');
// takes a glob string at a posix brace expression, and returns
// an equivalent regular expression source, and boolean indicating
// whether the /u flag needs to be applied, and the number of chars
// consumed to parse the character class.
// This also removes out of order ranges, and returns ($.) if the
// entire class just no good.
const
frontend/node_modules/sucrase/node_modules/minimatch/dist/commonjs/brace-expressions.js (Line 36:1 - Line 151:8), frontend/node_modules/sucrase/node_modules/minimatch/dist/esm/brace-expressions.js (Line 33:2 - Line 148:46)
const parseClass = (glob, position) => {
const pos = position;
/* c8 ignore start */
if (glob.charAt(pos) !== '[') {
throw new Error('not in a brace expression');
}
/* c8 ignore stop */
const ranges = [];
const negs = [];
let i = pos + 1;
let sawStart = false;
let uflag = false;
let escaping = false;
let negate = false;
let endPos = pos;
let rangeStart = '';
WHILE: while (i < glob.length) {
const c = glob.charAt(i);
if ((c === '!' || c === '^') && i === pos + 1) {
negate = true;
i++;
continue;
}
if (c === ']' && sawStart && !escaping) {
endPos = i + 1;
break;
}
sawStart = true;
if (c === '\\') {
if (!escaping) {
escaping = true;
i++;
continue;
}
// escaped \ char, fall through and treat like normal char
}
if (c === '[' && !escaping) {
// either a posix class, a collation equivalent, or just a [
for (const [cls, [unip, u, neg]] of Object.entries(posixClasses)) {
if (glob.startsWith(cls, i)) {
// invalid, [a-[] is fine, but not [a-[:alpha]]
if (rangeStart) {
return ['$.', false, glob.length - pos, true];
}
i += cls.length;
if (neg)
negs.push(unip);
else
ranges.push(unip);
uflag = uflag || u;
continue WHILE;
}
}
}
// now it's just a normal character, effectively
escaping = false;
if (rangeStart) {
// throw this range away if it's not valid, but others
// can still match.
if (c > rangeStart) {
ranges.push(braceEscape(rangeStart) + '-' + braceEscape(c));
}
else if (c === rangeStart) {
ranges.push(braceEscape(c));
}
rangeStart = '';
i++;
continue;
}
// now might be the start of a range.
// can be either c-d or c-] or c<more...>] or c] at this point
if (glob.startsWith('-]', i + 1)) {
ranges.push(braceEscape(c + '-'));
i += 2;
continue;
}
if (glob.startsWith('-', i + 1)) {
rangeStart = c;
i += 2;
continue;
}
// not the start of a range, just a single character
ranges.push(braceEscape(c));
i++;
}
if (endPos < i) {
// didn't see the end of the class, not a valid class,
// but might still be valid as a literal match.
return ['', false, 0, false];
}
// if we got no ranges and no negates, then we have a range that
// cannot possibly match anything, and that poisons the whole glob
if (!ranges.length && !negs.length) {
return ['$.', false, glob.length - pos, true];
}
// if we got one positive range, and it's a single character, then that's
// not actually a magic pattern, it's just that one literal character.
// we should not treat that as "magic", we should just return the literal
// character. [_] is a perfectly valid way to escape glob magic chars.
if (negs.length === 0 &&
ranges.length === 1 &&
/^\\?.$/.test(ranges[0]) &&
!negate) {
const r = ranges[0].length === 2 ? ranges[0].slice(-1) : ranges[0];
return [regexpEscape(r), false, endPos - pos, false];
}
const sranges = '[' + (negate ? '^' : '') + rangesToString(ranges) + ']';
const snegs = '[' + (negate ? '' : '^') + rangesToString(negs) + ']';
const comb = ranges.length && negs.length
? '(' + sranges + '|' + snegs + ')'
: ranges.length
? sranges
: snegs;
return [comb, uflag, endPos - pos, true];
};
exports
frontend/node_modules/sucrase/node_modules/minimatch/dist/commonjs/ast.js (Line 6:2 - Line 32:6), frontend/node_modules/sucrase/node_modules/minimatch/dist/esm/ast.js (Line 3:16 - Line 29:7)
;
const types = new Set(['!', '?', '+', '*', '@']);
const isExtglobType = (c) => types.has(c);
// Patterns that get prepended to bind to the start of either the
// entire string, or just a single path portion, to prevent dots
// and/or traversal patterns, when needed.
// Exts don't need the ^ or / bit, because the root binds that already.
const startNoTraversal = '(?!(?:^|/)\\.\\.?(?:$|/))';
const startNoDot = '(?!\\.)';
// characters that indicate a start of pattern needs the "no dots" bit,
// because a dot *might* be matched. ( is not in the list, because in
// the case of a child extglob, it will handle the prevention itself.
const addPatternStart = new Set(['[', '.']);
// cases where traversal is A-OK, no dot prevention needed
const justDots = new Set(['..', '.']);
const reSpecials = new Set('().*{}+?[]^$\\!');
const regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
// any single thing other than /
const qmark = '[^/]';
// * => any number of characters
const star = qmark + '*?';
// use + when we need to ensure that *something* matches, because the * is
// the only thing in the path portion.
const starNoEmpty = qmark + '+?';
// remove the \ chars that we added if we end up doing a nonmagic compare
// const deslash = (s: string) => s.replace(/\\(.)/g, '$1')
class
frontend/node_modules/sucrase/node_modules/minimatch/dist/commonjs/ast.js (Line 32:1 - Line 465:2), frontend/node_modules/sucrase/node_modules/minimatch/dist/esm/ast.js (Line 29:2 - Line 462:9)
class AST {
type;
#root;
#hasMagic;
#uflag = false;
#parts = [];
#parent;
#parentIndex;
#negs;
#filledNegs = false;
#options;
#toString;
// set to true if it's an extglob with no children
// (which really means one child of '')
#emptyExt = false;
constructor(type, parent, options = {}) {
this.type = type;
// extglobs are inherently magical
if (type)
this.#hasMagic = true;
this.#parent = parent;
this.#root = this.#parent ? this.#parent.#root : this;
this.#options = this.#root === this ? options : this.#root.#options;
this.#negs = this.#root === this ? [] : this.#root.#negs;
if (type === '!' && !this.#root.#filledNegs)
this.#negs.push(this);
this.#parentIndex = this.#parent ? this.#parent.#parts.length : 0;
}
get hasMagic() {
/* c8 ignore start */
if (this.#hasMagic !== undefined)
return this.#hasMagic;
/* c8 ignore stop */
for (const p of this.#parts) {
if (typeof p === 'string')
continue;
if (p.type || p.hasMagic)
return (this.#hasMagic = true);
}
// note: will be undefined until we generate the regexp src and find out
return this.#hasMagic;
}
// reconstructs the pattern
toString() {
if (this.#toString !== undefined)
return this.#toString;
if (!this.type) {
return (this.#toString = this.#parts.map(p => String(p)).join(''));
}
else {
return (this.#toString =
this.type + '(' + this.#parts.map(p => String(p)).join('|') + ')');
}
}
#fillNegs() {
/* c8 ignore start */
if (this !== this.#root)
throw new Error('should only call on root');
if (this.#filledNegs)
return this;
/* c8 ignore stop */
// call toString() once to fill this out
this.toString();
this.#filledNegs = true;
let n;
while ((n = this.#negs.pop())) {
if (n.type !== '!')
continue;
// walk up the tree, appending everthing that comes AFTER parentIndex
let p = n;
let pp = p.#parent;
while (pp) {
for (let i = p.#parentIndex + 1; !pp.type && i < pp.#parts.length; i++) {
for (const part of n.#parts) {
/* c8 ignore start */
if (typeof part === 'string') {
throw new Error('string part in extglob AST??');
}
/* c8 ignore stop */
part.copyIn(pp.#parts[i]);
}
}
p = pp;
pp = p.#parent;
}
}
return this;
}
push(...parts) {
for (const p of parts) {
if (p === '')
continue;
/* c8 ignore start */
if (typeof p !== 'string' && !(p instanceof AST && p.#parent === this)) {
throw new Error('invalid part: ' + p);
}
/* c8 ignore stop */
this.#parts.push(p);
}
}
toJSON() {
const ret = this.type === null
? this.#parts.slice().map(p => (typeof p === 'string' ? p : p.toJSON()))
: [this.type, ...this.#parts.map(p => p.toJSON())];
if (this.isStart() && !this.type)
ret.unshift([]);
if (this.isEnd() &&
(this === this.#root ||
(this.#root.#filledNegs && this.#parent?.type === '!'))) {
ret.push({});
}
return ret;
}
isStart() {
if (this.#root === this)
return true;
// if (this.type) return !!this.#parent?.isStart()
if (!this.#parent?.isStart())
return false;
if (this.#parentIndex === 0)
return true;
// if everything AHEAD of this is a negation, then it's still the "start"
const p = this.#parent;
for (let i = 0; i < this.#parentIndex; i++) {
const pp = p.#parts[i];
if (!(pp instanceof AST && pp.type === '!')) {
return false;
}
}
return true;
}
isEnd() {
if (this.#root === this)
return true;
if (this.#parent?.type === '!')
return true;
if (!this.#parent?.isEnd())
return false;
if (!this.type)
return this.#parent?.isEnd();
// if not root, it'll always have a parent
/* c8 ignore start */
const pl = this.#parent ? this.#parent.#parts.length : 0;
/* c8 ignore stop */
return this.#parentIndex === pl - 1;
}
copyIn(part) {
if (typeof part === 'string')
this.push(part);
else
this.push(part.clone(this));
}
clone(parent) {
const c = new AST(this.type, parent);
for (const p of this.#parts) {
c.copyIn(p);
}
return c;
}
static #parseAST(str, ast, pos, opt) {
let escaping = false;
let inBrace = false;
let braceStart = -1;
let braceNeg = false;
if (ast.type === null) {
// outside of a extglob, append until we find a start
let i = pos;
let acc = '';
while (i < str.length) {
const c = str.charAt(i++);
// still accumulate escapes at this point, but we do ignore
// starts that are escaped
if (escaping || c === '\\') {
escaping = !escaping;
acc += c;
continue;
}
if (inBrace) {
if (i === braceStart + 1) {
if (c === '^' || c === '!') {
braceNeg = true;
}
}
else if (c === ']' && !(i === braceStart + 2 && braceNeg)) {
inBrace = false;
}
acc += c;
continue;
}
else if (c === '[') {
inBrace = true;
braceStart = i;
braceNeg = false;
acc += c;
continue;
}
if (!opt.noext && isExtglobType(c) && str.charAt(i) === '(') {
ast.push(acc);
acc = '';
const ext = new AST(c, ast);
i = AST.#parseAST(str, ext, i, opt);
ast.push(ext);
continue;
}
acc += c;
}
ast.push(acc);
return i;
}
// some kind of extglob, pos is at the (
// find the next | or )
let i = pos + 1;
let part = new AST(null, ast);
const parts = [];
let acc = '';
while (i < str.length) {
const c = str.charAt(i++);
// still accumulate escapes at this point, but we do ignore
// starts that are escaped
if (escaping || c === '\\') {
escaping = !escaping;
acc += c;
continue;
}
if (inBrace) {
if (i === braceStart + 1) {
if (c === '^' || c === '!') {
braceNeg = true;
}
}
else if (c === ']' && !(i === braceStart + 2 && braceNeg)) {
inBrace = false;
}
acc += c;
continue;
}
else if (c === '[') {
inBrace = true;
braceStart = i;
braceNeg = false;
acc += c;
continue;
}
if (isExtglobType(c) && str.charAt(i) === '(') {
part.push(acc);
acc = '';
const ext = new AST(c, part);
part.push(ext);
i = AST.#parseAST(str, ext, i, opt);
continue;
}
if (c === '|') {
part.push(acc);
acc = '';
parts.push(part);
part = new AST(null, ast);
continue;
}
if (c === ')') {
if (acc === '' && ast.#parts.length === 0) {
ast.#emptyExt = true;
}
part.push(acc);
acc = '';
ast.push(...parts, part);
return i;
}
acc += c;
}
// unfinished extglob
// if we got here, it was a malformed extglob! not an extglob, but
// maybe something else in there.
ast.type = null;
ast.#hasMagic = undefined;
ast.#parts = [str.substring(pos - 1)];
return i;
}
static fromGlob(pattern, options = {}) {
const ast = new AST(null, undefined, options);
AST.#parseAST(pattern, ast, 0, options);
return ast;
}
// returns the regular expression if there's magic, or the unescaped
// string if not.
toMMPattern() {
// should only be called on root
/* c8 ignore start */
if (this !== this.#root)
return this.#root.toMMPattern();
/* c8 ignore stop */
const glob = this.toString();
const [re, body, hasMagic, uflag] = this.toRegExpSource();
// if we're in nocase mode, and not nocaseMagicOnly, then we do
// still need a regular expression if we have to case-insensitively
// match capital/lowercase characters.
const anyMagic = hasMagic ||
this.#hasMagic ||
(this.#options.nocase &&
!this.#options.nocaseMagicOnly &&
glob.toUpperCase() !== glob.toLowerCase());
if (!anyMagic) {
return body;
}
const flags = (this.#options.nocase ? 'i' : '') + (uflag ? 'u' : '');
return Object.assign(new RegExp(`^${re}$`, flags), {
_src: re,
_glob: glob,
});
}
get options() {
return this.#options;
}
// returns the string match, the regexp source, whether there's magic
// in the regexp (so a regular expression is required) and whether or
// not the uflag is needed for the regular expression (for posix classes)
// TODO: instead of injecting the start/end at this point, just return
// the BODY of the regexp, along with the start/end portions suitable
// for binding the start/end in either a joined full-path makeRe context
// (where we bind to (^|/), or a standalone matchPart context (where
// we bind to ^, and not /). Otherwise slashes get duped!
//
// In part-matching mode, the start is:
// - if not isStart: nothing
// - if traversal possible, but not allowed: ^(?!\.\.?$)
// - if dots allowed or not possible: ^
// - if dots possible and not allowed: ^(?!\.)
// end is:
// - if not isEnd(): nothing
// - else: $
//
// In full-path matching mode, we put the slash at the START of the
// pattern, so start is:
// - if first pattern: same as part-matching mode
// - if not isStart(): nothing
// - if traversal possible, but not allowed: /(?!\.\.?(?:$|/))
// - if dots allowed or not possible: /
// - if dots possible and not allowed: /(?!\.)
// end is:
// - if last pattern, same as part-matching mode
// - else nothing
//
// Always put the (?:$|/) on negated tails, though, because that has to be
// there to bind the end of the negated pattern portion, and it's easier to
// just stick it in now rather than try to inject it later in the middle of
// the pattern.
//
// We can just always return the same end, and leave it up to the caller
// to know whether it's going to be used joined or in parts.
// And, if the start is adjusted slightly, can do the same there:
// - if not isStart: nothing
// - if traversal possible, but not allowed: (?:/|^)(?!\.\.?$)
// - if dots allowed or not possible: (?:/|^)
// - if dots possible and not allowed: (?:/|^)(?!\.)
//
// But it's better to have a simpler binding without a conditional, for
// performance, so probably better to return both start options.
//
// Then the caller just ignores the end if it's not the first pattern,
// and the start always gets applied.
//
// But that's always going to be $ if it's the ending pattern, or nothing,
// so the caller can just attach $ at the end of the pattern when building.
//
// So the todo is:
// - better detect what kind of start is needed
// - return both flavors of starting pattern
// - attach $ at the end of the pattern when creating the actual RegExp
//
// Ah, but wait, no, that all only applies to the root when the first pattern
// is not an extglob. If the first pattern IS an extglob, then we need all
// that dot prevention biz to live in the extglob portions, because eg
// +(*|.x*) can match .xy but not .yx.
//
// So, return the two flavors if it's #root and the first child is not an
// AST, otherwise leave it to the child AST to handle it, and there,
// use the (?:^|/) style of start binding.
//
// Even simplified further:
// - Since the start for a join is eg /(?!\.) and the start for a part
// is ^(?!\.), we can just prepend (?!\.) to the pattern (either root
// or start or whatever) and prepend ^ or / at the Regexp construction.
toRegExpSource(allowDot) {
const dot = allowDot ?? !!this.#options.dot;
if (this.#root === this)
this.#fillNegs();
if (!this.type) {
const noEmpty = this.isStart() && this.isEnd();
const src = this.#parts
.map(p => {
const [re, _, hasMagic, uflag] = typeof p === 'string'
? AST.#parseGlob(p, this.#hasMagic, noEmpty)
: p.toRegExpSource(allowDot);
this.#hasMagic = this.#hasMagic || hasMagic;
this.#uflag = this.#uflag || uflag;
return re;
})
.join('');
let start = '';
if (this.isStart()) {
if (typeof this.#parts[0] === 'string') {
// this is the string that will match the start of the pattern,
// so we need to protect against dots and such.
// '.' and '..' cannot match unless the pattern is that exactly,
// even if it starts with . or dot:true is set.
const dotTravAllowed = this.#parts.length === 1 && justDots.has(this.#parts[0]);
if (!dotTravAllowed) {
const aps = addPatternStart;
// check if we have a possibility of matching . or ..,
// and prevent that.
const needNoTrav =
// dots are allowed, and the pattern starts with [ or .
(dot && aps.has(src.charAt(0))) ||
// the pattern starts with \., and then [ or .
(src.startsWith('\\.') && aps.has(src.charAt(2))) ||
// the pattern starts with \.\., and then [ or .
(src.startsWith('\\.\\.') && aps.has(src.charAt(4)));
// no need to prevent dots if it can't match a dot, or if a
// sub-pattern will be preventing it anyway.
const needNoDot = !dot && !allowDot && aps.has(src.charAt(0));
start = needNoTrav ? startNoTraversal : needNoDot ? startNoDot : '';
}
}
}
// append the "end of path portion" pattern to negation tails
let end = '';
if (this.isEnd() &&
this.#root.#filledNegs &&
this.#parent?.type === '!') {
end = '(?:$|\\/)';
}
const final = start + src + end;
return [
final,
(
frontend/node_modules/sucrase/node_modules/minimatch/dist/commonjs/ast.js (Line 465:2 - Line 484:2), frontend/node_modules/sucrase/node_modules/minimatch/dist/esm/ast.js (Line 462:9 - Line 481:9)
(src),
(this.#hasMagic = !!this.#hasMagic),
this.#uflag,
];
}
// We need to calculate the body *twice* if it's a repeat pattern
// at the start, once in nodot mode, then again in dot mode, so a
// pattern like *(?) can match 'x.y'
const repeated = this.type === '*' || this.type === '+';
// some kind of extglob
const start = this.type === '!' ? '(?:(?!(?:' : '(?:';
let body = this.#partsToRegExp(dot);
if (this.isStart() && this.isEnd() && !body && this.type !== '!') {
// invalid extglob, has to at least be *something* present, if it's
// the entire path portion.
const s = this.toString();
this.#parts = [s];
this.type = null;
this.#hasMagic = undefined;
return [s, (
frontend/node_modules/sucrase/node_modules/minimatch/dist/commonjs/ast.js (Line 484:2 - Line 521:2), frontend/node_modules/sucrase/node_modules/minimatch/dist/esm/ast.js (Line 481:9 - Line 518:9)
(this.toString()), false, false];
}
// XXX abstract out this map method
let bodyDotAllowed = !repeated || allowDot || dot || !startNoDot
? ''
: this.#partsToRegExp(true);
if (bodyDotAllowed === body) {
bodyDotAllowed = '';
}
if (bodyDotAllowed) {
body = `(?:${body})(?:${bodyDotAllowed})*?`;
}
// an empty !() is exactly equivalent to a starNoEmpty
let final = '';
if (this.type === '!' && this.#emptyExt) {
final = (this.isStart() && !dot ? startNoDot : '') + starNoEmpty;
}
else {
const close = this.type === '!'
? // !() must match something,but !(x) can match ''
'))' +
(this.isStart() && !dot && !allowDot ? startNoDot : '') +
star +
')'
: this.type === '@'
? ')'
: this.type === '?'
? ')?'
: this.type === '+' && bodyDotAllowed
? ')'
: this.type === '*' && bodyDotAllowed
? `)?`
: `)${this.type}`;
final = start + body + close;
}
return [
final,
(
frontend/node_modules/sucrase/node_modules/minimatch/dist/commonjs/ast.js (Line 521:2 - Line 564:2), frontend/node_modules/sucrase/node_modules/minimatch/dist/esm/ast.js (Line 518:9 - Line 561:11)
(body),
(this.#hasMagic = !!this.#hasMagic),
this.#uflag,
];
}
#partsToRegExp(dot) {
return this.#parts
.map(p => {
// extglob ASTs should only contain parent ASTs
/* c8 ignore start */
if (typeof p === 'string') {
throw new Error('string type in extglob ast??');
}
/* c8 ignore stop */
// can ignore hasMagic, because extglobs are already always magic
const [re, _, _hasMagic, uflag] = p.toRegExpSource(dot);
this.#uflag = this.#uflag || uflag;
return re;
})
.filter(p => !(this.isStart() && this.isEnd()) || !!p)
.join('|');
}
static #parseGlob(glob, hasMagic, noEmpty = false) {
let escaping = false;
let re = '';
let uflag = false;
for (let i = 0; i < glob.length; i++) {
const c = glob.charAt(i);
if (escaping) {
escaping = false;
re += (reSpecials.has(c) ? '\\' : '') + c;
continue;
}
if (c === '\\') {
if (i === glob.length - 1) {
re += '\\\\';
}
else {
escaping = true;
}
continue;
}
if (c === '[') {
const [src, needUflag, consumed, magic] = (
frontend/node_modules/sucrase/node_modules/minimatch/dist/commonjs/ast.js (Line 564:2 - Line 588:2), frontend/node_modules/sucrase/node_modules/minimatch/dist/esm/ast.js (Line 561:11 - Line 585:9)
(glob, i);
if (consumed) {
re += src;
uflag = uflag || needUflag;
i += consumed - 1;
hasMagic = hasMagic || magic;
continue;
}
}
if (c === '*') {
if (noEmpty && glob === '*')
re += starNoEmpty;
else
re += star;
hasMagic = true;
continue;
}
if (c === '?') {
re += qmark;
hasMagic = true;
continue;
}
re += regExpEscape(c);
}
return [re, (
frontend/node_modules/sucrase/node_modules/glob/dist/esm/walker.js (Line 229:9 - Line 240:2), frontend/node_modules/sucrase/node_modules/glob/dist/esm/walker.js (Line 202:9 - Line 213:2)
let tasks = 1;
const next = () => {
if (--tasks === 0)
cb();
};
for (const [m, absolute, ifDir] of processor.matches.entries()) {
if (this.#ignored(m))
continue;
tasks++;
this.match(m, absolute, ifDir).then(() => next());
}
for (const [
frontend/node_modules/sucrase/node_modules/glob/dist/esm/walker.js (Line 253:12 - Line 259:12), frontend/node_modules/sucrase/node_modules/glob/dist/esm/walker.js (Line 189:8 - Line 195:8)
(target, patterns, processor, cb) {
if (this.#childrenIgnored(target))
return cb();
if (this.signal?.aborted)
cb();
if (this.paused) {
this.onResume(() => this.walkCB2Sync
frontend/node_modules/sucrase/node_modules/glob/dist/esm/walker.js (Line 259:12 - Line 274:5), frontend/node_modules/sucrase/node_modules/glob/dist/esm/walker.js (Line 195:8 - Line 210:6)
(target, patterns, processor, cb));
return;
}
processor.processPatterns(target, patterns);
// done processing. all of the above is sync, can be abstracted out.
// subwalks is a map of paths to the entry filters they need
// matches is a map of paths to [absolute, ifDir] tuples.
let tasks = 1;
const next = () => {
if (--tasks === 0)
cb();
};
for (const [m, absolute, ifDir] of processor.matches.entries()) {
if (this.#ignored(m))
continue;
this
frontend/node_modules/sucrase/node_modules/glob/dist/esm/walker.js (Line 286:12 - Line 298:2), frontend/node_modules/sucrase/node_modules/glob/dist/esm/walker.js (Line 227:8 - Line 276:2)
(target, entries, processor, cb) {
processor = processor.filterEntries(target, entries);
let tasks = 1;
const next = () => {
if (--tasks === 0)
cb();
};
for (const [m, absolute, ifDir] of processor.matches.entries()) {
if (this.#ignored(m))
continue;
this.matchSync(m, absolute, ifDir);
}
for (const [
frontend/node_modules/sucrase/node_modules/glob/dist/esm/glob.js (Line 189:4 - Line 197:9), frontend/node_modules/sucrase/node_modules/glob/dist/esm/glob.js (Line 176:2 - Line 184:5)
frontend/node_modules/sucrase/node_modules/glob/dist/commonjs/walker.js (Line 19:1 - Line 190:15), frontend/node_modules/sucrase/node_modules/glob/dist/esm/walker.js (Line 16:2 - Line 187:10)
class GlobUtil {
path;
patterns;
opts;
seen = new Set();
paused = false;
aborted = false;
#onResume = [];
#ignore;
#sep;
signal;
maxDepth;
includeChildMatches;
constructor(patterns, path, opts) {
this.patterns = patterns;
this.path = path;
this.opts = opts;
this.#sep = !opts.posix && opts.platform === 'win32' ? '\\' : '/';
this.includeChildMatches = opts.includeChildMatches !== false;
if (opts.ignore || !this.includeChildMatches) {
this.#ignore = makeIgnore(opts.ignore ?? [], opts);
if (!this.includeChildMatches &&
typeof this.#ignore.add !== 'function') {
const m = 'cannot ignore child matches, ignore lacks add() method.';
throw new Error(m);
}
}
// ignore, always set with maxDepth, but it's optional on the
// GlobOptions type
/* c8 ignore start */
this.maxDepth = opts.maxDepth || Infinity;
/* c8 ignore stop */
if (opts.signal) {
this.signal = opts.signal;
this.signal.addEventListener('abort', () => {
this.#onResume.length = 0;
});
}
}
#ignored(path) {
return this.seen.has(path) || !!this.#ignore?.ignored?.(path);
}
#childrenIgnored(path) {
return !!this.#ignore?.childrenIgnored?.(path);
}
// backpressure mechanism
pause() {
this.paused = true;
}
resume() {
/* c8 ignore start */
if (this.signal?.aborted)
return;
/* c8 ignore stop */
this.paused = false;
let fn = undefined;
while (!this.paused && (fn = this.#onResume.shift())) {
fn();
}
}
onResume(fn) {
if (this.signal?.aborted)
return;
/* c8 ignore start */
if (!this.paused) {
fn();
}
else {
/* c8 ignore stop */
this.#onResume.push(fn);
}
}
// do the requisite realpath/stat checking, and return the path
// to add or undefined to filter it out.
async matchCheck(e, ifDir) {
if (ifDir && this.opts.nodir)
return undefined;
let rpc;
if (this.opts.realpath) {
rpc = e.realpathCached() || (await e.realpath());
if (!rpc)
return undefined;
e = rpc;
}
const needStat = e.isUnknown() || this.opts.stat;
const s = needStat ? await e.lstat() : e;
if (this.opts.follow && this.opts.nodir && s?.isSymbolicLink()) {
const target = await s.realpath();
/* c8 ignore start */
if (target && (target.isUnknown() || this.opts.stat)) {
await target.lstat();
}
/* c8 ignore stop */
}
return this.matchCheckTest(s, ifDir);
}
matchCheckTest(e, ifDir) {
return (e &&
(this.maxDepth === Infinity || e.depth() <= this.maxDepth) &&
(!ifDir || e.canReaddir()) &&
(!this.opts.nodir || !e.isDirectory()) &&
(!this.opts.nodir ||
!this.opts.follow ||
!e.isSymbolicLink() ||
!e.realpathCached()?.isDirectory()) &&
!this.#ignored(e)) ?
e
: undefined;
}
matchCheckSync(e, ifDir) {
if (ifDir && this.opts.nodir)
return undefined;
let rpc;
if (this.opts.realpath) {
rpc = e.realpathCached() || e.realpathSync();
if (!rpc)
return undefined;
e = rpc;
}
const needStat = e.isUnknown() || this.opts.stat;
const s = needStat ? e.lstatSync() : e;
if (this.opts.follow && this.opts.nodir && s?.isSymbolicLink()) {
const target = s.realpathSync();
if (target && (target?.isUnknown() || this.opts.stat)) {
target.lstatSync();
}
}
return this.matchCheckTest(s, ifDir);
}
matchFinish(e, absolute) {
if (this.#ignored(e))
return;
// we know we have an ignore if this is false, but TS doesn't
if (!this.includeChildMatches && this.#ignore?.add) {
const ign = `${e.relativePosix()}/**`;
this.#ignore.add(ign);
}
const abs = this.opts.absolute === undefined ? absolute : this.opts.absolute;
this.seen.add(e);
const mark = this.opts.mark && e.isDirectory() ? this.#sep : '';
// ok, we have what we need!
if (this.opts.withFileTypes) {
this.matchEmit(e);
}
else if (abs) {
const abs = this.opts.posix ? e.fullpathPosix() : e.fullpath();
this.matchEmit(abs + mark);
}
else {
const rel = this.opts.posix ? e.relativePosix() : e.relative();
const pre = this.opts.dotRelative && !rel.startsWith('..' + this.#sep) ?
'.' + this.#sep
: '';
this.matchEmit(!rel ? '.' + mark : pre + rel + mark);
}
}
async match(e, absolute, ifDir) {
const p = await this.matchCheck(e, ifDir);
if (p)
this.matchFinish(p, absolute);
}
matchSync(e, absolute, ifDir) {
const p = this.matchCheckSync(e, ifDir);
if (p)
this.matchFinish(p, absolute);
}
walkCB(target, patterns, cb) {
/* c8 ignore start */
if (this.signal?.aborted)
cb();
/* c8 ignore stop */
this.walkCB2(target, patterns, new processor_js_1
frontend/node_modules/sucrase/node_modules/glob/dist/commonjs/walker.js (Line 190:2 - Line 254:15), frontend/node_modules/sucrase/node_modules/glob/dist/esm/walker.js (Line 187:2 - Line 251:10)
Processor(this.opts), cb);
}
walkCB2(target, patterns, processor, cb) {
if (this.#childrenIgnored(target))
return cb();
if (this.signal?.aborted)
cb();
if (this.paused) {
this.onResume(() => this.walkCB2(target, patterns, processor, cb));
return;
}
processor.processPatterns(target, patterns);
// done processing. all of the above is sync, can be abstracted out.
// subwalks is a map of paths to the entry filters they need
// matches is a map of paths to [absolute, ifDir] tuples.
let tasks = 1;
const next = () => {
if (--tasks === 0)
cb();
};
for (const [m, absolute, ifDir] of processor.matches.entries()) {
if (this.#ignored(m))
continue;
tasks++;
this.match(m, absolute, ifDir).then(() => next());
}
for (const t of processor.subwalkTargets()) {
if (this.maxDepth !== Infinity && t.depth() >= this.maxDepth) {
continue;
}
tasks++;
const childrenCached = t.readdirCached();
if (t.calledReaddir())
this.walkCB3(t, childrenCached, processor, next);
else {
t.readdirCB((_, entries) => this.walkCB3(t, entries, processor, next), true);
}
}
next();
}
walkCB3(target, entries, processor, cb) {
processor = processor.filterEntries(target, entries);
let tasks = 1;
const next = () => {
if (--tasks === 0)
cb();
};
for (const [m, absolute, ifDir] of processor.matches.entries()) {
if (this.#ignored(m))
continue;
tasks++;
this.match(m, absolute, ifDir).then(() => next());
}
for (const [target, patterns] of processor.subwalks.entries()) {
tasks++;
this.walkCB2(target, patterns, processor.child(), next);
}
next();
}
walkCBSync(target, patterns, cb) {
/* c8 ignore start */
if (this.signal?.aborted)
cb();
/* c8 ignore stop */
this.walkCB2Sync(target, patterns, new processor_js_1
frontend/node_modules/sucrase/node_modules/glob/dist/commonjs/walker.js (Line 254:2 - Line 308:8), frontend/node_modules/sucrase/node_modules/glob/dist/esm/walker.js (Line 251:2 - Line 305:7)
Processor(this.opts), cb);
}
walkCB2Sync(target, patterns, processor, cb) {
if (this.#childrenIgnored(target))
return cb();
if (this.signal?.aborted)
cb();
if (this.paused) {
this.onResume(() => this.walkCB2Sync(target, patterns, processor, cb));
return;
}
processor.processPatterns(target, patterns);
// done processing. all of the above is sync, can be abstracted out.
// subwalks is a map of paths to the entry filters they need
// matches is a map of paths to [absolute, ifDir] tuples.
let tasks = 1;
const next = () => {
if (--tasks === 0)
cb();
};
for (const [m, absolute, ifDir] of processor.matches.entries()) {
if (this.#ignored(m))
continue;
this.matchSync(m, absolute, ifDir);
}
for (const t of processor.subwalkTargets()) {
if (this.maxDepth !== Infinity && t.depth() >= this.maxDepth) {
continue;
}
tasks++;
const children = t.readdirSync();
this.walkCB3Sync(t, children, processor, next);
}
next();
}
walkCB3Sync(target, entries, processor, cb) {
processor = processor.filterEntries(target, entries);
let tasks = 1;
const next = () => {
if (--tasks === 0)
cb();
};
for (const [m, absolute, ifDir] of processor.matches.entries()) {
if (this.#ignored(m))
continue;
this.matchSync(m, absolute, ifDir);
}
for (const [target, patterns] of processor.subwalks.entries()) {
tasks++;
this.walkCB2Sync(target, patterns, processor.child(), next);
}
next();
}
}
exports
frontend/node_modules/sucrase/node_modules/glob/dist/commonjs/walker.js (Line 309:1 - Line 349:8), frontend/node_modules/sucrase/node_modules/glob/dist/esm/walker.js (Line 305:2 - Line 345:7)
class GlobWalker extends GlobUtil {
matches = new Set();
constructor(patterns, path, opts) {
super(patterns, path, opts);
}
matchEmit(e) {
this.matches.add(e);
}
async walk() {
if (this.signal?.aborted)
throw this.signal.reason;
if (this.path.isUnknown()) {
await this.path.lstat();
}
await new Promise((res, rej) => {
this.walkCB(this.path, this.patterns, () => {
if (this.signal?.aborted) {
rej(this.signal.reason);
}
else {
res(this.matches);
}
});
});
return this.matches;
}
walkSync() {
if (this.signal?.aborted)
throw this.signal.reason;
if (this.path.isUnknown()) {
this.path.lstatSync();
}
// nothing for the callback to do, because this never pauses
this.walkCBSync(this.path, this.patterns, () => {
if (this.signal?.aborted)
throw this.signal.reason;
});
return this.matches;
}
}
exports
frontend/node_modules/sucrase/node_modules/glob/dist/commonjs/walker.js (Line 354:2 - Line 386:8), frontend/node_modules/sucrase/node_modules/glob/dist/esm/walker.js (Line 349:2 - Line 381:35)
frontend/node_modules/sucrase/node_modules/glob/dist/commonjs/processor.js (Line 9:1 - Line 29:8), frontend/node_modules/sucrase/node_modules/glob/dist/esm/processor.js (Line 6:2 - Line 30:4)
class HasWalkedCache {
store;
constructor(store = new Map()) {
this.store = store;
}
copy() {
return new HasWalkedCache(new Map(this.store));
}
hasWalked(target, pattern) {
return this.store.get(target.fullpath())?.has(pattern.globString());
}
storeWalked(target, pattern) {
const fullpath = target.fullpath();
const cached = this.store.get(fullpath);
if (cached)
cached.add(pattern.globString());
else
this.store.set(fullpath, new Set([pattern.globString()]));
}
}
exports
frontend/node_modules/sucrase/node_modules/glob/dist/commonjs/processor.js (Line 35:1 - Line 51:8), frontend/node_modules/sucrase/node_modules/glob/dist/esm/processor.js (Line 31:2 - Line 50:4)
class MatchRecord {
store = new Map();
add(target, absolute, ifDir) {
const n = (absolute ? 2 : 0) | (ifDir ? 1 : 0);
const current = this.store.get(target);
this.store.set(target, current === undefined ? n : n & current);
}
// match, absolute, ifdir
entries() {
return [...this.store.entries()].map(([path, n]) => [
path,
!!(n & 2),
!!(n & 1),
]);
}
}
exports
frontend/node_modules/sucrase/node_modules/glob/dist/commonjs/processor.js (Line 56:1 - Line 87:8), frontend/node_modules/sucrase/node_modules/glob/dist/esm/processor.js (Line 51:2 - Line 87:4)
class SubWalks {
store = new Map();
add(target, pattern) {
if (!target.canReaddir()) {
return;
}
const subs = this.store.get(target);
if (subs) {
if (!subs.find(p => p.globString() === pattern.globString())) {
subs.push(pattern);
}
}
else
this.store.set(target, [pattern]);
}
get(target) {
const subs = this.store.get(target);
/* c8 ignore start */
if (!subs) {
throw new Error('attempting to walk unknown path');
}
/* c8 ignore stop */
return subs;
}
entries() {
return this.keys().map(k => [k, this.store.get(k)]);
}
keys() {
return [...this.store.keys()].filter(t => t.canReaddir());
}
}
exports
frontend/node_modules/sucrase/node_modules/glob/dist/commonjs/processor.js (Line 94:1 - Line 161:12), frontend/node_modules/sucrase/node_modules/glob/dist/esm/processor.js (Line 88:2 - Line 155:9)
class Processor {
hasWalkedCache;
matches = new MatchRecord();
subwalks = new SubWalks();
patterns;
follow;
dot;
opts;
constructor(opts, hasWalkedCache) {
this.opts = opts;
this.follow = !!opts.follow;
this.dot = !!opts.dot;
this.hasWalkedCache =
hasWalkedCache ? hasWalkedCache.copy() : new HasWalkedCache();
}
processPatterns(target, patterns) {
this.patterns = patterns;
const processingSet = patterns.map(p => [target, p]);
// map of paths to the magic-starting subwalks they need to walk
// first item in patterns is the filter
for (let [t, pattern] of processingSet) {
this.hasWalkedCache.storeWalked(t, pattern);
const root = pattern.root();
const absolute = pattern.isAbsolute() && this.opts.absolute !== false;
// start absolute patterns at root
if (root) {
t = t.resolve(root === '/' && this.opts.root !== undefined ?
this.opts.root
: root);
const rest = pattern.rest();
if (!rest) {
this.matches.add(t, true, false);
continue;
}
else {
pattern = rest;
}
}
if (t.isENOENT())
continue;
let p;
let rest;
let changed = false;
while (typeof (p = pattern.pattern()) === 'string' &&
(rest = pattern.rest())) {
const c = t.resolve(p);
t = c;
pattern = rest;
changed = true;
}
p = pattern.pattern();
rest = pattern.rest();
if (changed) {
if (this.hasWalkedCache.hasWalked(t, pattern))
continue;
this.hasWalkedCache.storeWalked(t, pattern);
}
// now we have either a final string for a known entry,
// more strings for an unknown entry,
// or a pattern starting with magic, mounted on t.
if (typeof p === 'string') {
// must not be final entry, otherwise we would have
// concatenated it earlier.
const ifDir = p === '..' || p === '' || p === '.';
this.matches.add(t.resolve(p), absolute, ifDir);
continue;
}
else if (p === minimatch_1
frontend/node_modules/sucrase/node_modules/glob/dist/commonjs/processor.js (Line 161:2 - Line 219:12), frontend/node_modules/sucrase/node_modules/glob/dist/esm/processor.js (Line 155:2 - Line 213:9)
GLOBSTAR) {
// if no rest, match and subwalk pattern
// if rest, process rest and subwalk pattern
// if it's a symlink, but we didn't get here by way of a
// globstar match (meaning it's the first time THIS globstar
// has traversed a symlink), then we follow it. Otherwise, stop.
if (!t.isSymbolicLink() ||
this.follow ||
pattern.checkFollowGlobstar()) {
this.subwalks.add(t, pattern);
}
const rp = rest?.pattern();
const rrest = rest?.rest();
if (!rest || ((rp === '' || rp === '.') && !rrest)) {
// only HAS to be a dir if it ends in **/ or **/.
// but ending in ** will match files as well.
this.matches.add(t, absolute, rp === '' || rp === '.');
}
else {
if (rp === '..') {
// this would mean you're matching **/.. at the fs root,
// and no thanks, I'm not gonna test that specific case.
/* c8 ignore start */
const tp = t.parent || t;
/* c8 ignore stop */
if (!rrest)
this.matches.add(tp, absolute, true);
else if (!this.hasWalkedCache.hasWalked(tp, rrest)) {
this.subwalks.add(tp, rrest);
}
}
}
}
else if (p instanceof RegExp) {
this.subwalks.add(t, pattern);
}
}
return this;
}
subwalkTargets() {
return this.subwalks.keys();
}
child() {
return new Processor(this.opts, this.hasWalkedCache);
}
// return a new Processor containing the subwalks for each
// child entry, and a set of matches, and
// a hasWalkedCache that's a copy of this one
// then we're going to call
filterEntries(parent, entries) {
const patterns = this.subwalks.get(parent);
// put matches and entry walks into the results processor
const results = this.child();
for (const e of entries) {
for (const pattern of patterns) {
const absolute = pattern.isAbsolute();
const p = pattern.pattern();
const rest = pattern.rest();
if (p === minimatch_1
frontend/node_modules/sucrase/node_modules/glob/dist/commonjs/processor.js (Line 219:2 - Line 300:8), frontend/node_modules/sucrase/node_modules/glob/dist/esm/processor.js (Line 213:2 - Line 294:38)
GLOBSTAR) {
results.testGlobstar(e, pattern, rest, absolute);
}
else if (p instanceof RegExp) {
results.testRegExp(e, p, rest, absolute);
}
else {
results.testString(e, p, rest, absolute);
}
}
}
return results;
}
testGlobstar(e, pattern, rest, absolute) {
if (this.dot || !e.name.startsWith('.')) {
if (!pattern.hasMore()) {
this.matches.add(e, absolute, false);
}
if (e.canReaddir()) {
// if we're in follow mode or it's not a symlink, just keep
// testing the same pattern. If there's more after the globstar,
// then this symlink consumes the globstar. If not, then we can
// follow at most ONE symlink along the way, so we mark it, which
// also checks to ensure that it wasn't already marked.
if (this.follow || !e.isSymbolicLink()) {
this.subwalks.add(e, pattern);
}
else if (e.isSymbolicLink()) {
if (rest && pattern.checkFollowGlobstar()) {
this.subwalks.add(e, rest);
}
else if (pattern.markFollowGlobstar()) {
this.subwalks.add(e, pattern);
}
}
}
}
// if the NEXT thing matches this entry, then also add
// the rest.
if (rest) {
const rp = rest.pattern();
if (typeof rp === 'string' &&
// dots and empty were handled already
rp !== '..' &&
rp !== '' &&
rp !== '.') {
this.testString(e, rp, rest.rest(), absolute);
}
else if (rp === '..') {
/* c8 ignore start */
const ep = e.parent || e;
/* c8 ignore stop */
this.subwalks.add(ep, rest);
}
else if (rp instanceof RegExp) {
this.testRegExp(e, rp, rest.rest(), absolute);
}
}
}
testRegExp(e, p, rest, absolute) {
if (!p.test(e.name))
return;
if (!rest) {
this.matches.add(e, absolute, false);
}
else {
this.subwalks.add(e, rest);
}
}
testString(e, p, rest, absolute) {
// should never happen?
if (!e.isNamed(p))
return;
if (!rest) {
this.matches.add(e, absolute, false);
}
else {
this.subwalks.add(e, rest);
}
}
}
exports
frontend/node_modules/sucrase/node_modules/glob/dist/commonjs/pattern.js (Line 12:1 - Line 99:12), frontend/node_modules/sucrase/node_modules/glob/dist/esm/pattern.js (Line 9:2 - Line 96:9)
class Pattern {
#patternList;
#globList;
#index;
length;
#platform;
#rest;
#globString;
#isDrive;
#isUNC;
#isAbsolute;
#followGlobstar = true;
constructor(patternList, globList, index, platform) {
if (!isPatternList(patternList)) {
throw new TypeError('empty pattern list');
}
if (!isGlobList(globList)) {
throw new TypeError('empty glob list');
}
if (globList.length !== patternList.length) {
throw new TypeError('mismatched pattern list and glob list lengths');
}
this.length = patternList.length;
if (index < 0 || index >= this.length) {
throw new TypeError('index out of range');
}
this.#patternList = patternList;
this.#globList = globList;
this.#index = index;
this.#platform = platform;
// normalize root entries of absolute patterns on initial creation.
if (this.#index === 0) {
// c: => ['c:/']
// C:/ => ['C:/']
// C:/x => ['C:/', 'x']
// //host/share => ['//host/share/']
// //host/share/ => ['//host/share/']
// //host/share/x => ['//host/share/', 'x']
// /etc => ['/', 'etc']
// / => ['/']
if (this.isUNC()) {
// '' / '' / 'host' / 'share'
const [p0, p1, p2, p3, ...prest] = this.#patternList;
const [g0, g1, g2, g3, ...grest] = this.#globList;
if (prest[0] === '') {
// ends in /
prest.shift();
grest.shift();
}
const p = [p0, p1, p2, p3, ''].join('/');
const g = [g0, g1, g2, g3, ''].join('/');
this.#patternList = [p, ...prest];
this.#globList = [g, ...grest];
this.length = this.#patternList.length;
}
else if (this.isDrive() || this.isAbsolute()) {
const [p1, ...prest] = this.#patternList;
const [g1, ...grest] = this.#globList;
if (prest[0] === '') {
// ends in /
prest.shift();
grest.shift();
}
const p = p1 + '/';
const g = g1 + '/';
this.#patternList = [p, ...prest];
this.#globList = [g, ...grest];
this.length = this.#patternList.length;
}
}
}
/**
* The first entry in the parsed list of patterns
*/
pattern() {
return this.#patternList[this.#index];
}
/**
* true of if pattern() returns a string
*/
isString() {
return typeof this.#patternList[this.#index] === 'string';
}
/**
* true of if pattern() returns GLOBSTAR
*/
isGlobstar() {
return this.#patternList[this.#index] === minimatch_1
frontend/node_modules/sucrase/node_modules/glob/dist/commonjs/pattern.js (Line 99:2 - Line 218:8), frontend/node_modules/sucrase/node_modules/glob/dist/esm/pattern.js (Line 96:2 - Line 215:36)
GLOBSTAR;
}
/**
* true if pattern() returns a regexp
*/
isRegExp() {
return this.#patternList[this.#index] instanceof RegExp;
}
/**
* The /-joined set of glob parts that make up this pattern
*/
globString() {
return (this.#globString =
this.#globString ||
(this.#index === 0 ?
this.isAbsolute() ?
this.#globList[0] + this.#globList.slice(1).join('/')
: this.#globList.join('/')
: this.#globList.slice(this.#index).join('/')));
}
/**
* true if there are more pattern parts after this one
*/
hasMore() {
return this.length > this.#index + 1;
}
/**
* The rest of the pattern after this part, or null if this is the end
*/
rest() {
if (this.#rest !== undefined)
return this.#rest;
if (!this.hasMore())
return (this.#rest = null);
this.#rest = new Pattern(this.#patternList, this.#globList, this.#index + 1, this.#platform);
this.#rest.#isAbsolute = this.#isAbsolute;
this.#rest.#isUNC = this.#isUNC;
this.#rest.#isDrive = this.#isDrive;
return this.#rest;
}
/**
* true if the pattern represents a //unc/path/ on windows
*/
isUNC() {
const pl = this.#patternList;
return this.#isUNC !== undefined ?
this.#isUNC
: (this.#isUNC =
this.#platform === 'win32' &&
this.#index === 0 &&
pl[0] === '' &&
pl[1] === '' &&
typeof pl[2] === 'string' &&
!!pl[2] &&
typeof pl[3] === 'string' &&
!!pl[3]);
}
// pattern like C:/...
// split = ['C:', ...]
// XXX: would be nice to handle patterns like `c:*` to test the cwd
// in c: for *, but I don't know of a way to even figure out what that
// cwd is without actually chdir'ing into it?
/**
* True if the pattern starts with a drive letter on Windows
*/
isDrive() {
const pl = this.#patternList;
return this.#isDrive !== undefined ?
this.#isDrive
: (this.#isDrive =
this.#platform === 'win32' &&
this.#index === 0 &&
this.length > 1 &&
typeof pl[0] === 'string' &&
/^[a-z]:$/i.test(pl[0]));
}
// pattern = '/' or '/...' or '/x/...'
// split = ['', ''] or ['', ...] or ['', 'x', ...]
// Drive and UNC both considered absolute on windows
/**
* True if the pattern is rooted on an absolute path
*/
isAbsolute() {
const pl = this.#patternList;
return this.#isAbsolute !== undefined ?
this.#isAbsolute
: (this.#isAbsolute =
(pl[0] === '' && pl.length > 1) ||
this.isDrive() ||
this.isUNC());
}
/**
* consume the root of the pattern, and return it
*/
root() {
const p = this.#patternList[0];
return (typeof p === 'string' && this.isAbsolute() && this.#index === 0) ?
p
: '';
}
/**
* Check to see if the current globstar pattern is allowed to follow
* a symbolic link.
*/
checkFollowGlobstar() {
return !(this.#index === 0 ||
!this.isGlobstar() ||
!this.#followGlobstar);
}
/**
* Mark that the current globstar pattern is following a symbolic link
*/
markFollowGlobstar() {
if (this.#index === 0 || !this.isGlobstar() || !this.#followGlobstar)
return false;
this.#followGlobstar = false;
return true;
}
}
exports
frontend/node_modules/sucrase/node_modules/glob/dist/commonjs/ignore.js (Line 18:1 - Line 58:12), frontend/node_modules/sucrase/node_modules/glob/dist/esm/ignore.js (Line 15:2 - Line 55:10)
class Ignore {
relative;
relativeChildren;
absolute;
absoluteChildren;
platform;
mmopts;
constructor(ignored, { nobrace, nocase, noext, noglobstar, platform = defaultPlatform, }) {
this.relative = [];
this.absolute = [];
this.relativeChildren = [];
this.absoluteChildren = [];
this.platform = platform;
this.mmopts = {
dot: true,
nobrace,
nocase,
noext,
noglobstar,
optimizationLevel: 2,
platform,
nocomment: true,
nonegate: true,
};
for (const ign of ignored)
this.add(ign);
}
add(ign) {
// this is a little weird, but it gives us a clean set of optimized
// minimatch matchers, without getting tripped up if one of them
// ends in /** inside a brace section, and it's only inefficient at
// the start of the walk, not along it.
// It'd be nice if the Pattern class just had a .test() method, but
// handling globstars is a bit of a pita, and that code already lives
// in minimatch anyway.
// Another way would be if maybe Minimatch could take its set/globParts
// as an option, and then we could at least just use Pattern to test
// for absolute-ness.
// Yet another way, Minimatch could take an array of glob strings, and
// a cwd option, and do the right thing.
const mm = new minimatch_1
frontend/node_modules/sucrase/node_modules/glob/dist/commonjs/ignore.js (Line 58:2 - Line 73:13), frontend/node_modules/sucrase/node_modules/glob/dist/esm/ignore.js (Line 55:2 - Line 70:8)
Minimatch(ign, this.mmopts);
for (let i = 0; i < mm.set.length; i++) {
const parsed = mm.set[i];
const globParts = mm.globParts[i];
/* c8 ignore start */
if (!parsed || !globParts) {
throw new Error('invalid pattern object');
}
// strip off leading ./ portions
// https://github.com/isaacs/node-glob/issues/570
while (parsed[0] === '.' && globParts[0] === '.') {
parsed.shift();
globParts.shift();
}
/* c8 ignore stop */
const p = new pattern_js_1
frontend/node_modules/sucrase/node_modules/glob/dist/commonjs/ignore.js (Line 74:2 - Line 118:8), frontend/node_modules/sucrase/node_modules/glob/dist/esm/ignore.js (Line 71:2 - Line 115:35)
Minimatch(p.globString(), this.mmopts);
const children = globParts[globParts.length - 1] === '**';
const absolute = p.isAbsolute();
if (absolute)
this.absolute.push(m);
else
this.relative.push(m);
if (children) {
if (absolute)
this.absoluteChildren.push(m);
else
this.relativeChildren.push(m);
}
}
}
ignored(p) {
const fullpath = p.fullpath();
const fullpaths = `${fullpath}/`;
const relative = p.relative() || '.';
const relatives = `${relative}/`;
for (const m of this.relative) {
if (m.match(relative) || m.match(relatives))
return true;
}
for (const m of this.absolute) {
if (m.match(fullpath) || m.match(fullpaths))
return true;
}
return false;
}
childrenIgnored(p) {
const fullpath = p.fullpath() + '/';
const relative = (p.relative() || '.') + '/';
for (const m of this.relativeChildren) {
if (m.match(relative))
return true;
}
for (const m of this.absoluteChildren) {
if (m.match(fullpath))
return true;
}
return false;
}
}
exports
frontend/node_modules/sucrase/node_modules/glob/dist/commonjs/glob.js (Line 19:1 - Line 81:2), frontend/node_modules/sucrase/node_modules/glob/dist/esm/glob.js (Line 16:2 - Line 78:14)
class Glob {
absolute;
cwd;
root;
dot;
dotRelative;
follow;
ignore;
magicalBraces;
mark;
matchBase;
maxDepth;
nobrace;
nocase;
nodir;
noext;
noglobstar;
pattern;
platform;
realpath;
scurry;
stat;
signal;
windowsPathsNoEscape;
withFileTypes;
includeChildMatches;
/**
* The options provided to the constructor.
*/
opts;
/**
* An array of parsed immutable {@link Pattern} objects.
*/
patterns;
/**
* All options are stored as properties on the `Glob` object.
*
* See {@link GlobOptions} for full options descriptions.
*
* Note that a previous `Glob` object can be passed as the
* `GlobOptions` to another `Glob` instantiation to re-use settings
* and caches with a new pattern.
*
* Traversal functions can be called multiple times to run the walk
* again.
*/
constructor(pattern, opts) {
/* c8 ignore start */
if (!opts)
throw new TypeError('glob options required');
/* c8 ignore stop */
this.withFileTypes = !!opts.withFileTypes;
this.signal = opts.signal;
this.follow = !!opts.follow;
this.dot = !!opts.dot;
this.dotRelative = !!opts.dotRelative;
this.nodir = !!opts.nodir;
this.mark = !!opts.mark;
if (!opts.cwd) {
this.cwd = '';
}
else if (opts.cwd instanceof URL || opts.cwd.startsWith('file://')) {
opts.cwd = (
frontend/node_modules/sucrase/node_modules/glob/dist/commonjs/glob.js (Line 81:2 - Line 127:14), frontend/node_modules/sucrase/node_modules/glob/dist/esm/glob.js (Line 78:14 - Line 124:16)
frontend/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js (Line 3:2 - Line 27:16), frontend/node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js (Line 1:37 - Line 25:16)
;
/** Internal types handle bigint as number, because TS can't figure it out. */
function parseSexagesimal(str, asBigInt) {
const sign = str[0];
const parts = sign === '-' || sign === '+' ? str.substring(1) : str;
const num = (n) => asBigInt ? BigInt(n) : Number(n);
const res = parts
.replace(/_/g, '')
.split(':')
.reduce((res, p) => res * num(60) + num(p), num(0));
return (sign === '-' ? num(-1) * res : res);
}
/**
* hhhh:mm:ss.sss
*
* Internal types handle bigint as number, because TS can't figure it out.
*/
function stringifySexagesimal(node) {
let { value } = node;
let num = (n) => n;
if (typeof value === 'bigint')
num = n => BigInt(n);
else if (isNaN(value) || !isFinite(value))
return stringifyNumber
frontend/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js (Line 27:2 - Line 103:8), frontend/node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js (Line 25:2 - Line 101:7)
stringifyNumber(node);
let sign = '';
if (value < 0) {
sign = '-';
value *= num(-1);
}
const _60 = num(60);
const parts = [value % _60]; // seconds, including ms
if (value < 60) {
parts.unshift(0); // at least one : is required
}
else {
value = (value - parts[0]) / _60;
parts.unshift(value % _60); // minutes
if (value >= 60) {
value = (value - parts[0]) / _60;
parts.unshift(value); // hours
}
}
return (sign +
parts
.map(n => String(n).padStart(2, '0'))
.join(':')
.replace(/000000\d*$/, '') // % 60 may introduce error
);
}
const intTime = {
identify: value => typeof value === 'bigint' || Number.isInteger(value),
default: true,
tag: 'tag:yaml.org,2002:int',
format: 'TIME',
test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,
resolve: (str, _onError, { intAsBigInt }) => parseSexagesimal(str, intAsBigInt),
stringify: stringifySexagesimal
};
const floatTime = {
identify: value => typeof value === 'number',
default: true,
tag: 'tag:yaml.org,2002:float',
format: 'TIME',
test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,
resolve: str => parseSexagesimal(str, false),
stringify: stringifySexagesimal
};
const timestamp = {
identify: value => value instanceof Date,
default: true,
tag: 'tag:yaml.org,2002:timestamp',
// If the time zone is omitted, the timestamp is assumed to be specified in UTC. The time part
// may be omitted altogether, resulting in a date format. In such a case, the time part is
// assumed to be 00:00:00Z (start of day, UTC).
test: RegExp('^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})' + // YYYY-Mm-Dd
'(?:' + // time is optional
'(?:t|T|[ \\t]+)' + // t | T | whitespace
'([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)' + // Hh:Mm:Ss(.ss)?
'(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?' + // Z | +5 | -03:30
')?$'),
resolve(str) {
const match = str.match(timestamp.test);
if (!match)
throw new Error('!!timestamp expects a date, starting with yyyy-mm-dd');
const [, year, month, day, hour, minute, second] = match.map(Number);
const millisec = match[7] ? Number((match[7] + '00').substr(1, 3)) : 0;
let date = Date.UTC(year, month - 1, day, hour || 0, minute || 0, second || 0, millisec);
const tz = match[8];
if (tz && tz !== 'Z') {
let d = parseSexagesimal(tz, false);
if (Math.abs(d) < 30)
d *= 60;
date -= 60000 * d;
}
return new Date(date);
},
stringify: ({ value }) => value?.toISOString().replace(/(T00:00:00)?\.000Z$/, '') ?? ''
};
exports
frontend/node_modules/yaml/dist/schema/yaml-1.1/set.js (Line 43:2 - Line 48:2), frontend/node_modules/yaml/browser/dist/schema/yaml-1.1/set.js (Line 41:2 - Line 46:2)
findPair(this.items, key);
if (prev && !value) {
this.items.splice(this.items.indexOf(prev), 1);
}
else if (!prev && value) {
this.items.push(new Pair.
frontend/node_modules/yaml/dist/schema/yaml-1.1/set.js (Line 48:2 - Line 69:5), frontend/node_modules/yaml/browser/dist/schema/yaml-1.1/set.js (Line 46:2 - Line 67:11)
Pair(key));
}
}
toJSON(_, ctx) {
return super.toJSON(_, ctx, Set);
}
toString(ctx, onComment, onChompKeep) {
if (!ctx)
return JSON.stringify(this);
if (this.hasAllNullValues(true))
return super.toString(Object.assign({}, ctx, { allNullValues: true }), onComment, onChompKeep);
else
throw new Error('Set items must all have null values');
}
static from(schema, iterable, ctx) {
const { replacer } = ctx;
const set = new this(schema);
if (iterable && Symbol.iterator in Object(iterable))
for (let value of iterable) {
if (typeof replacer === 'function')
value = replacer.call(iterable, value, value);
set.items.push(Pair
frontend/node_modules/yaml/dist/schema/yaml-1.1/set.js (Line 69:2 - Line 83:9), frontend/node_modules/yaml/browser/dist/schema/yaml-1.1/set.js (Line 67:2 - Line 81:6)
frontend/node_modules/yaml/dist/schema/yaml-1.1/pairs.js (Line 39:2 - Line 68:5), frontend/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js (Line 37:2 - Line 66:11)
YAMLSeq(schema);
pairs.tag = 'tag:yaml.org,2002:pairs';
let i = 0;
if (iterable && Symbol.iterator in Object(iterable))
for (let it of iterable) {
if (typeof replacer === 'function')
it = replacer.call(iterable, String(i++), it);
let key, value;
if (Array.isArray(it)) {
if (it.length === 2) {
key = it[0];
value = it[1];
}
else
throw new TypeError(`Expected [key, value] tuple: ${it}`);
}
else if (it && it instanceof Object) {
const keys = Object.keys(it);
if (keys.length === 1) {
key = keys[0];
value = it[key];
}
else {
throw new TypeError(`Expected tuple with one key, not ${keys.length} keys`);
}
}
else {
key = it;
}
pairs.items.push(Pair
frontend/node_modules/yaml/dist/schema/yaml-1.1/omap.js (Line 16:2 - Line 31:9), frontend/node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js (Line 14:2 - Line 29:7)
YAMLMap.prototype.set.bind(this);
this.tag = YAMLOMap.tag;
}
/**
* If `ctx` is given, the return type is actually `Map<unknown, unknown>`,
* but TypeScript won't allow widening the signature of a child method.
*/
toJSON(_, ctx) {
if (!ctx)
return super.toJSON(_);
const map = new Map();
if (ctx?.onCreate)
ctx.onCreate(map);
for (const pair of this.items) {
let key, value;
if (identity
frontend/node_modules/yaml/dist/schema/yaml-1.1/omap.js (Line 36:2 - Line 45:7), frontend/node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js (Line 34:2 - Line 43:6)
toJS(pair, '', ctx);
}
if (map.has(key))
throw new Error('Ordered maps must not include duplicate keys');
map.set(key, value);
}
return map;
}
static from(schema, iterable, ctx) {
const pairs$
frontend/node_modules/yaml/dist/schema/yaml-1.1/omap.js (Line 62:2 - Line 71:7), frontend/node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js (Line 60:2 - Line 69:6)
isScalar(key)) {
if (seenKeys.includes(key.value)) {
onError(`Ordered maps must not include duplicate keys: ${key.value}`);
}
else {
seenKeys.push(key.value);
}
}
}
return Object.assign(new YAMLOMap(), pairs$
frontend/node_modules/yaml/dist/schema/yaml-1.1/merge.js (Line 4:2 - Line 20:2), frontend/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js (Line 2:24 - Line 18:2)
;
// If the value associated with a merge key is a single mapping node, each of
// its key/value pairs is inserted into the current mapping, unless the key
// already exists in it. If the value associated with the merge key is a
// sequence, then this sequence is expected to contain mapping nodes and each
// of these nodes is merged in turn according to its order in the sequence.
// Keys in mapping nodes earlier in the sequence override keys specified in
// later mapping nodes. -- http://yaml.org/type/merge.html
const MERGE_KEY = '<<';
const merge = {
identify: value => value === MERGE_KEY ||
(typeof value === 'symbol' && value.description === MERGE_KEY),
default: 'key',
tag: 'tag:yaml.org,2002:merge',
test: /^<<$/,
resolve: () => Object.assign(new Scalar.
frontend/node_modules/yaml/dist/schema/yaml-1.1/merge.js (Line 32:2 - Line 42:9), frontend/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js (Line 30:2 - Line 40:8)
isSeq(value))
for (const it of value.items)
mergeValue(ctx, map, it);
else if (Array.isArray(value))
for (const it of value)
mergeValue(ctx, map, it);
else
mergeValue(ctx, map, value);
}
function mergeValue(ctx, map, value) {
const source = ctx && identity
frontend/node_modules/yaml/dist/schema/yaml-1.1/merge.js (Line 43:2 - Line 66:8), frontend/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js (Line 41:2 - Line 64:7)
isMap(source))
throw new Error('Merge sources must be maps or map aliases');
const srcMap = source.toJSON(null, ctx, Map);
for (const [key, value] of srcMap) {
if (map instanceof Map) {
if (!map.has(key))
map.set(key, value);
}
else if (map instanceof Set) {
map.add(key);
}
else if (!Object.prototype.hasOwnProperty.call(map, key)) {
Object.defineProperty(map, key, {
value,
writable: true,
enumerable: true,
configurable: true
});
}
}
return map;
}
exports
frontend/node_modules/yaml/dist/schema/yaml-1.1/int.js (Line 3:2 - Line 35:16), frontend/node_modules/yaml/browser/dist/schema/yaml-1.1/int.js (Line 1:37 - Line 33:16)
;
const intIdentify = (value) => typeof value === 'bigint' || Number.isInteger(value);
function intResolve(str, offset, radix, { intAsBigInt }) {
const sign = str[0];
if (sign === '-' || sign === '+')
offset += 1;
str = str.substring(offset).replace(/_/g, '');
if (intAsBigInt) {
switch (radix) {
case 2:
str = `0b${str}`;
break;
case 8:
str = `0o${str}`;
break;
case 16:
str = `0x${str}`;
break;
}
const n = BigInt(str);
return sign === '-' ? BigInt(-1) * n : n;
}
const n = parseInt(str, radix);
return sign === '-' ? -1 * n : n;
}
function intStringify(node, radix, prefix) {
const { value } = node;
if (intIdentify(value)) {
const str = value.toString(radix);
return value < 0 ? '-' + prefix + str.substr(1) : prefix + str;
}
return stringifyNumber
frontend/node_modules/yaml/dist/schema/yaml-1.1/int.js (Line 35:2 - Line 61:2), frontend/node_modules/yaml/browser/dist/schema/yaml-1.1/int.js (Line 33:2 - Line 60:2)
frontend/node_modules/yaml/dist/schema/yaml-1.1/bool.js (Line 3:2 - Line 16:2), frontend/node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js (Line 1:24 - Line 14:2)
;
function boolStringify({ value, source }, ctx) {
const boolObj = value ? trueTag : falseTag;
if (source && boolObj.test.test(source))
return source;
return value ? ctx.options.trueStr : ctx.options.falseStr;
}
const trueTag = {
identify: value => value === true,
default: true,
tag: 'tag:yaml.org,2002:bool',
test: /^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,
resolve: () => new Scalar.
frontend/node_modules/yaml/dist/schema/yaml-1.1/binary.js (Line 23:2 - Line 41:12), frontend/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js (Line 17:9 - Line 35:5)
if (typeof atob === 'function') {
// On IE 11, atob() can't handle newlines
const str = atob(src.replace(/[\n\r]/g, ''));
const buffer = new Uint8Array(str.length);
for (let i = 0; i < str.length; ++i)
buffer[i] = str.charCodeAt(i);
return buffer;
}
else {
onError('This environment does not support reading binary tags; either Buffer or atob is required');
return src;
}
},
stringify({ comment, type, value }, ctx, onComment, onChompKeep) {
if (!value)
return '';
const buf = value; // checked earlier by binary.identify()
let str;
if (typeof node_buffer
frontend/node_modules/yaml/dist/schema/yaml-1.1/binary.js (Line 47:2 - Line 56:7), frontend/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js (Line 35:9 - Line 44:14)
if (typeof btoa === 'function') {
let s = '';
for (let i = 0; i < buf.length; ++i)
s += String.fromCharCode(buf[i]);
str = btoa(s);
}
else {
throw new Error('This environment does not support writing binary tags; either Buffer or btoa is required');
}
type ?? (type = Scalar.Scalar
frontend/node_modules/yaml/dist/schema/yaml-1.1/binary.js (Line 57:2 - Line 64:7), frontend/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js (Line 45:2 - Line 52:14)
Scalar.QUOTE_DOUBLE) {
const lineWidth = Math.max(ctx.options.lineWidth - ctx.indent.length, ctx.options.minContentWidth);
const n = Math.ceil(str.length / lineWidth);
const lines = new Array(n);
for (let i = 0, o = 0; i < n; ++i, o += lineWidth) {
lines[i] = str.substr(o, lineWidth);
}
str = lines.join(type === Scalar.Scalar
frontend/node_modules/yaml/dist/schema/json/schema.js (Line 5:2 - Line 21:2), frontend/node_modules/yaml/browser/dist/schema/json/schema.js (Line 3:19 - Line 19:2)
;
function intIdentify(value) {
return typeof value === 'bigint' || Number.isInteger(value);
}
const stringifyJSON = ({ value }) => JSON.stringify(value);
const jsonScalars = [
{
identify: value => typeof value === 'string',
default: true,
tag: 'tag:yaml.org,2002:str',
resolve: str => str,
stringify: stringifyJSON
},
{
identify: value => value == null,
createNode: () => new Scalar.
frontend/node_modules/yaml/dist/schema/json/schema.js (Line 21:2 - Line 62:2), frontend/node_modules/yaml/browser/dist/schema/json/schema.js (Line 19:2 - Line 60:2)
frontend/node_modules/yaml/browser/dist/parse/parser.js (Line 700:17 - Line 706:4), frontend/node_modules/yaml/browser/dist/parse/parser.js (Line 477:17 - Line 483:4)
if (it.value) {
const end = 'end' in it.value ? it.value.end : undefined;
const last = Array.isArray(end) ? end[end.length - 1] : undefined;
if (last?.type === 'comment')
end?.push(this.sourceToken);
else
seq
frontend/node_modules/yaml/browser/dist/parse/parser.js (Line 717:4 - Line 722:4), frontend/node_modules/yaml/browser/dist/parse/parser.js (Line 502:4 - Line 507:4)
.items.length - 2];
const end = prev?.value?.end;
if (Array.isArray(end)) {
Array.prototype.push.apply(end, it.start);
end.push(this.sourceToken);
seq
frontend/node_modules/yaml/browser/dist/parse/parser.js (Line 850:9 - Line 857:7), frontend/node_modules/yaml/browser/dist/parse/parser.js (Line 456:17 - Line 463:6)
if (this.onNewLine) {
let nl = this.source.indexOf('\n') + 1;
while (nl !== 0) {
this.onNewLine(this.offset + nl);
nl = this.source.indexOf('\n', nl) + 1;
}
}
return
frontend/node_modules/yaml/browser/dist/nodes/Collection.js (Line 138:6 - Line 145:2), frontend/node_modules/yaml/browser/dist/nodes/Collection.js (Line 68:6 - Line 78:8)
(rest, value);
else if (node === undefined && this.schema)
this.set(key, collectionFromPath(this.schema, rest, value));
else
throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);
}
}
}
frontend/node_modules/yaml/browser/dist/doc/Document.js (Line 300:2 - Line 313:8), frontend/node_modules/yaml/browser/dist/nodes/Node.js (Line 28:2 - Line 36:2)
'', ctx);
if (typeof onAnchor === 'function')
for (const { count, res } of ctx.anchors.values())
onAnchor(res, count);
return typeof reviver === 'function'
? applyReviver(reviver, { '': res }, '', res)
: res;
}
/**
* A JSON representation of the document `contents`.
*
* @param jsonArg Used by `JSON.stringify` to indicate the array index or
* property name.
*/
frontend/node_modules/tailwindcss/lib/cli/build/utils.js (Line 26:11 - Line 36:16), frontend/node_modules/tailwindcss/lib/cli/init/index.js (Line 9:5 - Line 19:6)
frontend/node_modules/tailwindcss/lib/cli/build/deps.js (Line 1:1 - Line 13:12), frontend/node_modules/tailwindcss/lib/cli/build/utils.js (Line 1:1 - Line 13:16)
// @ts-check
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
loadPostcss
frontend/node_modules/sucrase/dist/parser/util/whitespace.js (Line 10:2 - Line 26:8), frontend/node_modules/sucrase/dist/esm/parser/util/whitespace.js (Line 10:3 - Line 28:7)
charCodes.oghamSpaceMark,
0x2000, // EN QUAD
0x2001, // EM QUAD
0x2002, // EN SPACE
0x2003, // EM SPACE
0x2004, // THREE-PER-EM SPACE
0x2005, // FOUR-PER-EM SPACE
0x2006, // SIX-PER-EM SPACE
0x2007, // FIGURE SPACE
0x2008, // PUNCTUATION SPACE
0x2009, // THIN SPACE
0x200a, // HAIR SPACE
0x202f, // NARROW NO-BREAK SPACE
0x205f, // MEDIUM MATHEMATICAL SPACE
0x3000, // IDEOGRAPHIC SPACE
0xfeff, // ZERO WIDTH NO-BREAK SPACE
]; exports
frontend/node_modules/sucrase/dist/parser/util/identifier.js (Line 2:2 - Line 15:6), frontend/node_modules/sucrase/dist/esm/parser/util/identifier.js (Line 2:15 - Line 15:7)
;
function computeIsIdentifierChar(code) {
if (code < 48) return code === 36;
if (code < 58) return true;
if (code < 65) return false;
if (code < 91) return true;
if (code < 97) return code === 95;
if (code < 123) return true;
if (code < 128) return false;
throw new Error("Should not be called with non-ASCII char code.");
}
const
frontend/node_modules/sucrase/dist/parser/util/charcodes.js (Line 1:2 - Line 107:8), frontend/node_modules/sucrase/dist/esm/parser/util/charcodes.js (Line 1:2 - Line 107:10)
frontend/node_modules/sucrase/dist/parser/tokenizer/types.js (Line 130:2 - Line 361:2), frontend/node_modules/sucrase/dist/esm/parser/tokenizer/types.js (Line 130:2 - Line 361:2)
function formatTokenType(tokenType) {
switch (tokenType) {
case TokenType.num:
return "num";
case TokenType.bigint:
return "bigint";
case TokenType.decimal:
return "decimal";
case TokenType.regexp:
return "regexp";
case TokenType.string:
return "string";
case TokenType.name:
return "name";
case TokenType.eof:
return "eof";
case TokenType.bracketL:
return "[";
case TokenType.bracketR:
return "]";
case TokenType.braceL:
return "{";
case TokenType.braceBarL:
return "{|";
case TokenType.braceR:
return "}";
case TokenType.braceBarR:
return "|}";
case TokenType.parenL:
return "(";
case TokenType.parenR:
return ")";
case TokenType.comma:
return ",";
case TokenType.semi:
return ";";
case TokenType.colon:
return ":";
case TokenType.doubleColon:
return "::";
case TokenType.dot:
return ".";
case TokenType.question:
return "?";
case TokenType.questionDot:
return "?.";
case TokenType.arrow:
return "=>";
case TokenType.template:
return "template";
case TokenType.ellipsis:
return "...";
case TokenType.backQuote:
return "`";
case TokenType.dollarBraceL:
return "${";
case TokenType.at:
return "@";
case TokenType.hash:
return "#";
case TokenType.eq:
return "=";
case TokenType.assign:
return "_=";
case TokenType.preIncDec:
return "++/--";
case TokenType.postIncDec:
return "++/--";
case TokenType.bang:
return "!";
case TokenType.tilde:
return "~";
case TokenType.pipeline:
return "|>";
case TokenType.nullishCoalescing:
return "??";
case TokenType.logicalOR:
return "||";
case TokenType.logicalAND:
return "&&";
case TokenType.bitwiseOR:
return "|";
case TokenType.bitwiseXOR:
return "^";
case TokenType.bitwiseAND:
return "&";
case TokenType.equality:
return "==/!=";
case TokenType.lessThan:
return "<";
case TokenType.greaterThan:
return ">";
case TokenType.relationalOrEqual:
return "<=/>=";
case TokenType.bitShiftL:
return "<<";
case TokenType.bitShiftR:
return ">>/>>>";
case TokenType.plus:
return "+";
case TokenType.minus:
return "-";
case TokenType.modulo:
return "%";
case TokenType.star:
return "*";
case TokenType.slash:
return "/";
case TokenType.exponent:
return "**";
case TokenType.jsxName:
return "jsxName";
case TokenType.jsxText:
return "jsxText";
case TokenType.jsxEmptyText:
return "jsxEmptyText";
case TokenType.jsxTagStart:
return "jsxTagStart";
case TokenType.jsxTagEnd:
return "jsxTagEnd";
case TokenType.typeParameterStart:
return "typeParameterStart";
case TokenType.nonNullAssertion:
return "nonNullAssertion";
case TokenType._break:
return "break";
case TokenType._case:
return "case";
case TokenType._catch:
return "catch";
case TokenType._continue:
return "continue";
case TokenType._debugger:
return "debugger";
case TokenType._default:
return "default";
case TokenType._do:
return "do";
case TokenType._else:
return "else";
case TokenType._finally:
return "finally";
case TokenType._for:
return "for";
case TokenType._function:
return "function";
case TokenType._if:
return "if";
case TokenType._return:
return "return";
case TokenType._switch:
return "switch";
case TokenType._throw:
return "throw";
case TokenType._try:
return "try";
case TokenType._var:
return "var";
case TokenType._let:
return "let";
case TokenType._const:
return "const";
case TokenType._while:
return "while";
case TokenType._with:
return "with";
case TokenType._new:
return "new";
case TokenType._this:
return "this";
case TokenType._super:
return "super";
case TokenType._class:
return "class";
case TokenType._extends:
return "extends";
case TokenType._export:
return "export";
case TokenType._import:
return "import";
case TokenType._yield:
return "yield";
case TokenType._null:
return "null";
case TokenType._true:
return "true";
case TokenType._false:
return "false";
case TokenType._in:
return "in";
case TokenType._instanceof:
return "instanceof";
case TokenType._typeof:
return "typeof";
case TokenType._void:
return "void";
case TokenType._delete:
return "delete";
case TokenType._async:
return "async";
case TokenType._get:
return "get";
case TokenType._set:
return "set";
case TokenType._declare:
return "declare";
case TokenType._readonly:
return "readonly";
case TokenType._abstract:
return "abstract";
case TokenType._static:
return "static";
case TokenType._public:
return "public";
case TokenType._private:
return "private";
case TokenType._protected:
return "protected";
case TokenType._override:
return "override";
case TokenType._as:
return "as";
case TokenType._enum:
return "enum";
case TokenType._type:
return "type";
case TokenType._implements:
return "implements";
default:
return "";
}
}
frontend/node_modules/sucrase/dist/parser/tokenizer/state.js (Line 17:2 - Line 33:8), frontend/node_modules/sucrase/dist/esm/parser/tokenizer/state.js (Line 17:2 - Line 35:7)
frontend/node_modules/sucrase/dist/parser/tokenizer/state.js (Line 35:2 - Line 55:7), frontend/node_modules/sucrase/dist/esm/parser/tokenizer/state.js (Line 35:2 - Line 55:3)
class State {constructor() { State.prototype.__init.call(this);State.prototype.__init2.call(this);State.prototype.__init3.call(this);State.prototype.__init4.call(this);State.prototype.__init5.call(this);State.prototype.__init6.call(this);State.prototype.__init7.call(this);State.prototype.__init8.call(this);State.prototype.__init9.call(this);State.prototype.__init10.call(this);State.prototype.__init11.call(this);State.prototype.__init12.call(this);State.prototype.__init13.call(this); }
// Used to signify the start of a potential arrow function
__init() {this.potentialArrowAt = -1}
// Used by Flow to handle an edge case involving function type parsing.
__init2() {this.noAnonFunctionType = false}
// Used by TypeScript to handle ambiguities when parsing conditional types.
__init3() {this.inDisallowConditionalTypesContext = false}
// Token store.
__init4() {this.tokens = []}
// Array of all observed scopes, ordered by their ending position.
__init5() {this.scopes = []}
// The current position of the tokenizer in the input.
__init6() {this.pos = 0}
// Information about the current token.
__init7() {this.type = _types
frontend/node_modules/sucrase/dist/parser/tokenizer/state.js (Line 56:2 - Line 106:2), frontend/node_modules/sucrase/dist/esm/parser/tokenizer/state.js (Line 56:2 - Line 106:2)
ContextualKeyword.NONE}
__init9() {this.start = 0}
__init10() {this.end = 0}
__init11() {this.isType = false}
__init12() {this.scopeDepth = 0}
/**
* If the parser is in an error state, then the token is always tt.eof and all functions can
* keep executing but should be written so they don't get into an infinite loop in this situation.
*
* This approach, combined with the ability to snapshot and restore state, allows us to implement
* backtracking without exceptions and without needing to explicitly propagate error states
* everywhere.
*/
__init13() {this.error = null}
snapshot() {
return new StateSnapshot(
this.potentialArrowAt,
this.noAnonFunctionType,
this.inDisallowConditionalTypesContext,
this.tokens.length,
this.scopes.length,
this.pos,
this.type,
this.contextualKeyword,
this.start,
this.end,
this.isType,
this.scopeDepth,
this.error,
);
}
restoreFromSnapshot(snapshot) {
this.potentialArrowAt = snapshot.potentialArrowAt;
this.noAnonFunctionType = snapshot.noAnonFunctionType;
this.inDisallowConditionalTypesContext = snapshot.inDisallowConditionalTypesContext;
this.tokens.length = snapshot.tokensLength;
this.scopes.length = snapshot.scopesLength;
this.pos = snapshot.pos;
this.type = snapshot.type;
this.contextualKeyword = snapshot.contextualKeyword;
this.start = snapshot.start;
this.end = snapshot.end;
this.isType = snapshot.isType;
this.scopeDepth = snapshot.scopeDepth;
this.error = snapshot.error;
}
}
frontend/node_modules/sucrase/dist/parser/tokenizer/readWordTree.js (Line 6:2 - Line 24:10), frontend/node_modules/sucrase/dist/esm/parser/tokenizer/readWordTree.js (Line 6:2 - Line 24:18)
frontend/node_modules/sucrase/dist/esm/transformers/ESMImportTransformer.js (Line 372:9 - Line 379:61), frontend/node_modules/sucrase/dist/esm/transformers/ESMImportTransformer.js (Line 264:11 - Line 271:19)
while (this.tokens.currentIndex() < specifierInfo.endIndex) {
this.tokens.removeToken();
}
if (this.tokens.matches1(tt.comma)) {
this.tokens.removeToken();
}
} else {
// Non-type export, so copy all tokens, including any comma.
frontend/node_modules/sucrase/dist/esm/transformers/ESMImportTransformer.js (Line 380:2 - Line 391:3), frontend/node_modules/sucrase/dist/esm/transformers/ESMImportTransformer.js (Line 271:2 - Line 281:2)
= true;
while (this.tokens.currentIndex() < specifierInfo.endIndex) {
this.tokens.copyToken();
}
if (this.tokens.matches1(tt.comma)) {
this.tokens.copyToken();
}
}
}
this.tokens.copyExpectedToken(tt.braceR);
if
frontend/node_modules/sucrase/dist/esm/transformers/CJSImportTransformer.js (Line 179:2 - Line 186:5), frontend/node_modules/sucrase/dist/esm/transformers/ESMImportTransformer.js (Line 185:8 - Line 192:7)
);
if (
this.tokens.matchesContextual(ContextualKeyword._type) &&
!this.tokens.matches1AtIndex(this.tokens.currentIndex() + 1, tt.comma) &&
!this.tokens.matchesContextualAtIndex(this.tokens.currentIndex() + 1, ContextualKeyword._from)
) {
// This is an "import type" statement, so exit early.
this
frontend/node_modules/sucrase/dist/esm/transformers/CJSImportTransformer.js (Line 329:2 - Line 366:5), frontend/node_modules/sucrase/dist/esm/transformers/ESMImportTransformer.js (Line 93:5 - Line 130:7)
if (
this.tokens.matches2(tt._export, tt.name) &&
this.tokens.matchesContextualAtIndex(this.tokens.currentIndex() + 1, ContextualKeyword._type)
) {
// export type {a};
// export type {a as b};
// export type {a} from './b';
// export type * from './b';
// export type * as ns from './b';
this.tokens.removeInitialToken();
this.tokens.removeToken();
if (this.tokens.matches1(tt.braceL)) {
while (!this.tokens.matches1(tt.braceR)) {
this.tokens.removeToken();
}
this.tokens.removeToken();
} else {
// *
this.tokens.removeToken();
if (this.tokens.matches1(tt._as)) {
// as
this.tokens.removeToken();
// ns
this.tokens.removeToken();
}
}
// Remove type re-export `... } from './T'`
if (
this.tokens.matchesContextual(ContextualKeyword._from) &&
this.tokens.matches1AtIndex(this.tokens.currentIndex() + 1, tt.string)
) {
this.tokens.removeToken();
this.tokens.removeToken();
removeMaybeImportAttributes(this.tokens);
}
return true;
}
this
frontend/node_modules/sucrase/dist/esm/transformers/CJSImportTransformer.js (Line 433:2 - Line 442:6), frontend/node_modules/sucrase/dist/esm/transformers/CJSImportTransformer.js (Line 401:2 - Line 410:3)
frontend/node_modules/sucrase/dist/esm/transformers/CJSImportTransformer.js (Line 712:9 - Line 719:2), frontend/node_modules/sucrase/dist/esm/transformers/CJSImportTransformer.js (Line 666:5 - Line 673:5)
const endIndex = this.tokens.currentToken().rhsEndIndex;
if (endIndex == null) {
throw new Error("Expected = token with an end index.");
}
while (this.tokens.currentIndex() < endIndex) {
this.rootTransformer.processToken();
}
}
frontend/node_modules/sucrase/dist/esm/transformers/CJSImportTransformer.js (Line 739:7 - Line 746:4), frontend/node_modules/sucrase/dist/esm/transformers/CJSImportTransformer.js (Line 666:5 - Line 673:12)
const endIndex = this.tokens.currentToken().rhsEndIndex;
if (endIndex == null) {
throw new Error("Expected = token with an end index.");
}
while (this.tokens.currentIndex() < endIndex) {
this.rootTransformer.processToken();
}
this.tokens.appendCode(")"
frontend/node_modules/lucide-react/dist/esm/icons/tally-4.js (Line 10:9 - Line 15:2), frontend/node_modules/lucide-react/dist/esm/icons/tally-5.js (Line 10:9 - Line 14:2)
frontend/node_modules/@tanstack/react-query/build/modern/useQueries.cjs (Line 113:2 - Line 127:62), frontend/node_modules/@tanstack/react-query/build/modern/useQueries.js (Line 94:12 - Line 108:7)
({
result,
errorResetBoundary,
throwOnError: query.throwOnError,
query: client.getQueryCache().get(query.queryHash),
suspense: query.suspense
});
}
);
if (firstSingleResultWhichShouldThrow?.error) {
throw firstSingleResultWhichShouldThrow.error;
}
return getCombinedResult(trackResult());
}
// Annotate the CommonJS export names for ESM import in node:
frontend/node_modules/@tanstack/react-query/build/modern/usePrefetchQuery.cjs (Line 1:13 - Line 20:28), frontend/node_modules/@tanstack/react-query/build/modern/useSuspenseQuery.cjs (Line 2:13 - Line 21:27)
;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/usePrefetchQuery.tsx
frontend/node_modules/@tanstack/react-query/build/modern/usePrefetchInfiniteQuery.cjs (Line 1:1 - Line 20:36), frontend/node_modules/@tanstack/react-query/build/modern/usePrefetchQuery.cjs (Line 1:1 - Line 21:27)
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/usePrefetchInfiniteQuery.tsx
frontend/node_modules/@tanstack/react-query/build/modern/useMutationState.cjs (Line 1:1 - Line 31:27), frontend/node_modules/@tanstack/react-query/build/modern/useQueries.cjs (Line 1:1 - Line 31:21)
"use strict";
"use client";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/useMutationState.ts
frontend/node_modules/@tanstack/react-query/build/modern/useMutationState.cjs (Line 42:2 - Line 54:2), frontend/node_modules/@tanstack/react-query/build/modern/useMutationState.js (Line 8:15 - Line 20:15)
frontend/node_modules/@tanstack/react-query/build/modern/useMutation.cjs (Line 1:1 - Line 31:22), frontend/node_modules/@tanstack/react-query/build/modern/useQueries.cjs (Line 1:1 - Line 31:21)
"use strict";
"use client";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/useMutation.ts
frontend/node_modules/@tanstack/react-query/build/modern/useMutation.cjs (Line 43:2 - Line 53:18), frontend/node_modules/@tanstack/react-query/build/modern/useMutation.js (Line 15:2 - Line 25:14)
frontend/node_modules/@tanstack/react-query/build/modern/useIsFetching.cjs (Line 1:1 - Line 31:24), frontend/node_modules/@tanstack/react-query/build/modern/useQueries.cjs (Line 1:1 - Line 31:21)
"use strict";
"use client";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/useIsFetching.ts
frontend/node_modules/@tanstack/react-query/build/modern/useInfiniteQuery.cjs (Line 1:1 - Line 21:27), frontend/node_modules/@tanstack/react-query/build/modern/useSuspenseQuery.cjs (Line 1:1 - Line 21:27)
"use strict";
"use client";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/useInfiniteQuery.ts
frontend/node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs (Line 1:1 - Line 31:23), frontend/node_modules/@tanstack/react-query/build/modern/useQueries.cjs (Line 1:1 - Line 31:21)
"use strict";
"use client";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/useBaseQuery.ts
frontend/node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs (Line 54:2 - Line 67:2), frontend/node_modules/@tanstack/react-query/build/modern/useBaseQuery.js (Line 30:15 - Line 43:21)
(queryClient);
const defaultedOptions = client.defaultQueryOptions(options);
client.getDefaultOptions().queries?._experimental_beforeQuery?.(
defaultedOptions
);
if (process.env.NODE_ENV !== "production") {
if (!defaultedOptions.queryFn) {
console.error(
`[${defaultedOptions.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`
);
}
}
defaultedOptions._optimisticResults = isRestoring ? "isRestoring" : "optimistic";
(
frontend/node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs (Line 69:2 - Line 82:18), frontend/node_modules/@tanstack/react-query/build/modern/useBaseQuery.js (Line 45:27 - Line 58:14)
frontend/node_modules/@tanstack/react-query/build/modern/types.cjs (Line 5:15 - Line 16:16), frontend/node_modules/@tanstack/react-query/build/modern/useSuspenseQuery.cjs (Line 10:2 - Line 21:27)
;
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/types.ts
frontend/node_modules/@tanstack/react-query/build/modern/suspense.cjs (Line 1:1 - Line 20:19), frontend/node_modules/@tanstack/react-query/build/modern/usePrefetchQuery.cjs (Line 1:1 - Line 21:27)
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/suspense.ts
frontend/node_modules/@tanstack/react-query/build/modern/suspense.cjs (Line 30:1 - Line 46:62), frontend/node_modules/@tanstack/react-query/build/modern/suspense.js (Line 2:1 - Line 18:7)
var defaultThrowOnError = (_error, query) => query.state.data === void 0;
var ensureSuspenseTimers = (defaultedOptions) => {
if (defaultedOptions.suspense) {
const clamp = (value) => value === "static" ? value : Math.max(value ?? 1e3, 1e3);
const originalStaleTime = defaultedOptions.staleTime;
defaultedOptions.staleTime = typeof originalStaleTime === "function" ? (...args) => clamp(originalStaleTime(...args)) : clamp(originalStaleTime);
if (typeof defaultedOptions.gcTime === "number") {
defaultedOptions.gcTime = Math.max(defaultedOptions.gcTime, 1e3);
}
}
};
var willFetch = (result, isRestoring) => result.isLoading && result.isFetching && !isRestoring;
var shouldSuspend = (defaultedOptions, result) => defaultedOptions?.suspense && result.isPending;
var fetchOptimistic = (defaultedOptions, observer, errorResetBoundary) => observer.fetchOptimistic(defaultedOptions).catch(() => {
errorResetBoundary.clearReset();
});
// Annotate the CommonJS export names for ESM import in node:
frontend/node_modules/@tanstack/react-query/build/modern/queryOptions.cjs (Line 1:1 - Line 20:23), frontend/node_modules/@tanstack/react-query/build/modern/usePrefetchQuery.cjs (Line 1:1 - Line 21:27)
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/queryOptions.ts
frontend/node_modules/@tanstack/react-query/build/modern/mutationOptions.cjs (Line 1:1 - Line 20:26), frontend/node_modules/@tanstack/react-query/build/modern/usePrefetchQuery.cjs (Line 1:1 - Line 21:27)
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/mutationOptions.ts
frontend/node_modules/@tanstack/react-query/build/modern/infiniteQueryOptions.cjs (Line 1:1 - Line 20:31), frontend/node_modules/@tanstack/react-query/build/modern/usePrefetchQuery.cjs (Line 1:1 - Line 21:27)
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/infiniteQueryOptions.ts
frontend/node_modules/@tanstack/react-query/build/modern/index.cjs (Line 1:1 - Line 18:11), frontend/node_modules/@tanstack/react-query/build/modern/usePrefetchQuery.cjs (Line 1:1 - Line 19:13)
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __reExport
frontend/node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.cjs (Line 1:1 - Line 31:29), frontend/node_modules/@tanstack/react-query/build/modern/useQueries.cjs (Line 1:1 - Line 31:21)
"use strict";
"use client";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/errorBoundaryUtils.ts
frontend/node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.cjs (Line 40:2 - Line 60:2), frontend/node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.js (Line 5:23 - Line 25:17)
frontend/node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.cjs (Line 1:1 - Line 31:35), frontend/node_modules/@tanstack/react-query/build/modern/useQueries.cjs (Line 1:1 - Line 31:21)
"use strict";
"use client";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/QueryErrorResetBoundary.tsx
frontend/node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.cjs (Line 39:2 - Line 60:2), frontend/node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.js (Line 5:20 - Line 26:4)
frontend/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs (Line 1:1 - Line 31:31), frontend/node_modules/@tanstack/react-query/build/modern/useQueries.cjs (Line 1:1 - Line 31:21)
"use strict";
"use client";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/QueryClientProvider.tsx
frontend/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs (Line 40:2 - Line 64:2), frontend/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js (Line 5:20 - Line 29:4)
;
var QueryClientContext = React.createContext(
void 0
);
var useQueryClient = (queryClient) => {
const client = React.useContext(QueryClientContext);
if (queryClient) {
return queryClient;
}
if (!client) {
throw new Error("No QueryClient set, use QueryClientProvider to set one");
}
return client;
};
var QueryClientProvider = ({
client,
children
}) => {
React.useEffect(() => {
client.mount();
return () => {
client.unmount();
};
}, [client]);
return /* @__PURE__ */ (
frontend/node_modules/@tanstack/react-query/build/modern/IsRestoringProvider.cjs (Line 1:1 - Line 31:30), frontend/node_modules/@tanstack/react-query/build/modern/useQueries.cjs (Line 1:1 - Line 31:21)
"use strict";
"use client";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/IsRestoringProvider.ts
frontend/node_modules/@tanstack/react-query/build/modern/HydrationBoundary.cjs (Line 1:1 - Line 31:29), frontend/node_modules/@tanstack/react-query/build/modern/useQueries.cjs (Line 1:1 - Line 31:21)
"use strict";
"use client";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/HydrationBoundary.tsx
frontend/node_modules/@tanstack/react-query/build/modern/HydrationBoundary.cjs (Line 46:2 - Line 70:2), frontend/node_modules/@tanstack/react-query/build/modern/HydrationBoundary.js (Line 13:15 - Line 37:8)
frontend/node_modules/@tanstack/react-query/build/legacy/useIsFetching.cjs (Line 1:1 - Line 56:43), frontend/node_modules/@tanstack/react-query/build/modern/useQueries.cjs (Line 1:1 - Line 56:43)
"use strict";
"use client";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/useIsFetching.ts
var useIsFetching_exports = {};
__export(useIsFetching_exports, {
useIsFetching: () => useIsFetching
});
module.exports = __toCommonJS(useIsFetching_exports);
var React = __toESM(require("react"), 1);
var import_query_core = require("@tanstack/query-core");
var import_QueryClientProvider = require("./QueryClientProvider.cjs");
function useIsFetching(filters, queryClient) {
const client = (0, import_QueryClientProvider.useQueryClient)(queryClient);
const queryCache = client.getQueryCache();
return React.useSyncExternalStore(
React.useCallback(
(onStoreChange) => queryCache.subscribe(import_query_core.notifyManager.batchCalls(onStoreChange)),
[queryCache]
),
() => client.isFetching(filters),
() => client.isFetching(filters)
);
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
useIsFetching
});
//# sourceMappingURL=useIsFetching.cjs.map
frontend/node_modules/@tanstack/react-query/build/legacy/useInfiniteQuery.cjs (Line 1:1 - Line 40:46), frontend/node_modules/@tanstack/react-query/build/modern/useSuspenseQuery.cjs (Line 1:1 - Line 40:46)
"use strict";
"use client";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/useInfiniteQuery.ts
var useInfiniteQuery_exports = {};
__export(useInfiniteQuery_exports, {
useInfiniteQuery: () => useInfiniteQuery
});
module.exports = __toCommonJS(useInfiniteQuery_exports);
var import_query_core = require("@tanstack/query-core");
var import_useBaseQuery = require("./useBaseQuery.cjs");
function useInfiniteQuery(options, queryClient) {
return (0, import_useBaseQuery.useBaseQuery)(
options,
import_query_core.InfiniteQueryObserver,
queryClient
);
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
useInfiniteQuery
});
//# sourceMappingURL=useInfiniteQuery.cjs.map
frontend/node_modules/@tanstack/react-query/build/legacy/useBaseQuery.js (Line 1:1 - Line 21:4), frontend/node_modules/@tanstack/react-query/build/modern/useBaseQuery.js (Line 1:1 - Line 21:3)
"use client";
// src/useBaseQuery.ts
import * as React from "react";
import { isServer, noop, notifyManager } from "@tanstack/query-core";
import { useQueryClient } from "./QueryClientProvider.js";
import { useQueryErrorResetBoundary } from "./QueryErrorResetBoundary.js";
import {
ensurePreventErrorBoundaryRetry,
getHasError,
useClearResetErrorBoundary
} from "./errorBoundaryUtils.js";
import { useIsRestoring } from "./IsRestoringProvider.js";
import {
ensureSuspenseTimers,
fetchOptimistic,
shouldSuspend,
willFetch
} from "./suspense.js";
function useBaseQuery(options, Observer, queryClient) {
var
frontend/node_modules/@tanstack/react-query/build/legacy/useBaseQuery.js (Line 22:3 - Line 33:2), frontend/node_modules/@tanstack/react-query/build/modern/useBaseQuery.js (Line 21:3 - Line 32:7)
if (process.env.NODE_ENV !== "production") {
if (typeof options !== "object" || Array.isArray(options)) {
throw new Error(
'Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object'
);
}
}
const isRestoring = useIsRestoring();
const errorResetBoundary = useQueryErrorResetBoundary();
const client = useQueryClient(queryClient);
const defaultedOptions = client.defaultQueryOptions(options);
(
frontend/node_modules/@tanstack/react-query/build/legacy/useBaseQuery.js (Line 35:5 - Line 85:2), frontend/node_modules/@tanstack/react-query/build/modern/useBaseQuery.js (Line 33:5 - Line 83:7)
defaultedOptions
);
if (process.env.NODE_ENV !== "production") {
if (!defaultedOptions.queryFn) {
console.error(
`[${defaultedOptions.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`
);
}
}
defaultedOptions._optimisticResults = isRestoring ? "isRestoring" : "optimistic";
ensureSuspenseTimers(defaultedOptions);
ensurePreventErrorBoundaryRetry(defaultedOptions, errorResetBoundary);
useClearResetErrorBoundary(errorResetBoundary);
const isNewCacheEntry = !client.getQueryCache().get(defaultedOptions.queryHash);
const [observer] = React.useState(
() => new Observer(
client,
defaultedOptions
)
);
const result = observer.getOptimisticResult(defaultedOptions);
const shouldSubscribe = !isRestoring && options.subscribed !== false;
React.useSyncExternalStore(
React.useCallback(
(onStoreChange) => {
const unsubscribe = shouldSubscribe ? observer.subscribe(notifyManager.batchCalls(onStoreChange)) : noop;
observer.updateResult();
return unsubscribe;
},
[observer, shouldSubscribe]
),
() => observer.getCurrentResult(),
() => observer.getCurrentResult()
);
React.useEffect(() => {
observer.setOptions(defaultedOptions);
}, [defaultedOptions, observer]);
if (shouldSuspend(defaultedOptions, result)) {
throw fetchOptimistic(defaultedOptions, observer, errorResetBoundary);
}
if (getHasError({
result,
errorResetBoundary,
throwOnError: defaultedOptions.throwOnError,
query: client.getQueryCache().get(defaultedOptions.queryHash),
suspense: defaultedOptions.suspense
})) {
throw result.error;
}
;
(
frontend/node_modules/@tanstack/react-query/build/legacy/useBaseQuery.cjs (Line 1:1 - Line 45:4), frontend/node_modules/@tanstack/react-query/build/modern/useQueries.cjs (Line 1:1 - Line 45:3)
"use strict";
"use client";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/useBaseQuery.ts
var useBaseQuery_exports = {};
__export(useBaseQuery_exports, {
useBaseQuery: () => useBaseQuery
});
module.exports = __toCommonJS(useBaseQuery_exports);
var React = __toESM(require("react"), 1);
var import_query_core = require("@tanstack/query-core");
var import_QueryClientProvider = require("./QueryClientProvider.cjs");
var import_QueryErrorResetBoundary = require("./QueryErrorResetBoundary.cjs");
var import_errorBoundaryUtils = require("./errorBoundaryUtils.cjs");
var import_IsRestoringProvider = require("./IsRestoringProvider.cjs");
var import_suspense = require("./suspense.cjs");
function useBaseQuery(options, Observer, queryClient) {
var
frontend/node_modules/@tanstack/react-query/build/legacy/useBaseQuery.cjs (Line 43:2 - Line 53:2), frontend/node_modules/@tanstack/react-query/build/legacy/useBaseQuery.js (Line 19:16 - Line 29:15)
;
function useBaseQuery(options, Observer, queryClient) {
var _a, _b, _c, _d, _e;
if (process.env.NODE_ENV !== "production") {
if (typeof options !== "object" || Array.isArray(options)) {
throw new Error(
'Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object'
);
}
}
const isRestoring = (
frontend/node_modules/@tanstack/react-query/build/legacy/useBaseQuery.cjs (Line 46:3 - Line 57:2), frontend/node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs (Line 45:3 - Line 56:7)
if (process.env.NODE_ENV !== "production") {
if (typeof options !== "object" || Array.isArray(options)) {
throw new Error(
'Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object'
);
}
}
const isRestoring = (0, import_IsRestoringProvider.useIsRestoring)();
const errorResetBoundary = (0, import_QueryErrorResetBoundary.useQueryErrorResetBoundary)();
const client = (0, import_QueryClientProvider.useQueryClient)(queryClient);
const defaultedOptions = client.defaultQueryOptions(options);
(
frontend/node_modules/@tanstack/react-query/build/legacy/useBaseQuery.cjs (Line 55:2 - Line 69:2), frontend/node_modules/@tanstack/react-query/build/legacy/useBaseQuery.js (Line 31:15 - Line 45:21)
(queryClient);
const defaultedOptions = client.defaultQueryOptions(options);
(_b = (_a = client.getDefaultOptions().queries) == null ? void 0 : _a._experimental_beforeQuery) == null ? void 0 : _b.call(
_a,
defaultedOptions
);
if (process.env.NODE_ENV !== "production") {
if (!defaultedOptions.queryFn) {
console.error(
`[${defaultedOptions.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`
);
}
}
defaultedOptions._optimisticResults = isRestoring ? "isRestoring" : "optimistic";
(
frontend/node_modules/@tanstack/react-query/build/legacy/useBaseQuery.cjs (Line 59:5 - Line 109:2), frontend/node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs (Line 57:5 - Line 107:7)
defaultedOptions
);
if (process.env.NODE_ENV !== "production") {
if (!defaultedOptions.queryFn) {
console.error(
`[${defaultedOptions.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`
);
}
}
defaultedOptions._optimisticResults = isRestoring ? "isRestoring" : "optimistic";
(0, import_suspense.ensureSuspenseTimers)(defaultedOptions);
(0, import_errorBoundaryUtils.ensurePreventErrorBoundaryRetry)(defaultedOptions, errorResetBoundary);
(0, import_errorBoundaryUtils.useClearResetErrorBoundary)(errorResetBoundary);
const isNewCacheEntry = !client.getQueryCache().get(defaultedOptions.queryHash);
const [observer] = React.useState(
() => new Observer(
client,
defaultedOptions
)
);
const result = observer.getOptimisticResult(defaultedOptions);
const shouldSubscribe = !isRestoring && options.subscribed !== false;
React.useSyncExternalStore(
React.useCallback(
(onStoreChange) => {
const unsubscribe = shouldSubscribe ? observer.subscribe(import_query_core.notifyManager.batchCalls(onStoreChange)) : import_query_core.noop;
observer.updateResult();
return unsubscribe;
},
[observer, shouldSubscribe]
),
() => observer.getCurrentResult(),
() => observer.getCurrentResult()
);
React.useEffect(() => {
observer.setOptions(defaultedOptions);
}, [defaultedOptions, observer]);
if ((0, import_suspense.shouldSuspend)(defaultedOptions, result)) {
throw (0, import_suspense.fetchOptimistic)(defaultedOptions, observer, errorResetBoundary);
}
if ((0, import_errorBoundaryUtils.getHasError)({
result,
errorResetBoundary,
throwOnError: defaultedOptions.throwOnError,
query: client.getQueryCache().get(defaultedOptions.queryHash),
suspense: defaultedOptions.suspense
})) {
throw result.error;
}
;
(
frontend/node_modules/@tanstack/react-query/build/legacy/useBaseQuery.cjs (Line 99:2 - Line 114:18), frontend/node_modules/@tanstack/react-query/build/legacy/useBaseQuery.js (Line 75:12 - Line 90:9)
frontend/node_modules/@tanstack/react-query/build/legacy/useBaseQuery.cjs (Line 111:5 - Line 120:2), frontend/node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs (Line 108:5 - Line 117:7)
defaultedOptions,
result
);
if (defaultedOptions.experimental_prefetchInRender && !import_query_core.isServer && (0, import_suspense.willFetch)(result, isRestoring)) {
const promise = isNewCacheEntry ? (
// Fetch immediately on render in order to ensure `.promise` is resolved even if the component is unmounted
(0, import_suspense.fetchOptimistic)(defaultedOptions, observer, errorResetBoundary)
) : (
// subscribe to the "cache promise" so that we can finalize the currentThenable once data comes in
(
frontend/node_modules/@tanstack/react-query/build/legacy/useBaseQuery.cjs (Line 122:8 - Line 132:42), frontend/node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs (Line 119:2 - Line 129:42)
frontend/node_modules/@tanstack/react-query/build/legacy/errorBoundaryUtils.cjs (Line 1:1 - Line 68:48), frontend/node_modules/@tanstack/react-query/build/modern/useQueries.cjs (Line 1:1 - Line 68:48)
"use strict";
"use client";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/errorBoundaryUtils.ts
var errorBoundaryUtils_exports = {};
__export(errorBoundaryUtils_exports, {
ensurePreventErrorBoundaryRetry: () => ensurePreventErrorBoundaryRetry,
getHasError: () => getHasError,
useClearResetErrorBoundary: () => useClearResetErrorBoundary
});
module.exports = __toCommonJS(errorBoundaryUtils_exports);
var React = __toESM(require("react"), 1);
var import_query_core = require("@tanstack/query-core");
var ensurePreventErrorBoundaryRetry = (options, errorResetBoundary) => {
if (options.suspense || options.throwOnError || options.experimental_prefetchInRender) {
if (!errorResetBoundary.isReset()) {
options.retryOnMount = false;
}
}
};
var useClearResetErrorBoundary = (errorResetBoundary) => {
React.useEffect(() => {
errorResetBoundary.clearReset();
}, [errorResetBoundary]);
};
var getHasError = ({
result,
errorResetBoundary,
throwOnError,
query,
suspense
}) => {
return result.isError && !errorResetBoundary.isReset() && !result.isFetching && query && (suspense && result.data === void 0 || (0, import_query_core.shouldThrowError)(throwOnError, [result.error, query]));
};
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
ensurePreventErrorBoundaryRetry,
getHasError,
useClearResetErrorBoundary
});
//# sourceMappingURL=errorBoundaryUtils.cjs.map
frontend/node_modules/@tanstack/react-query/build/legacy/QueryErrorResetBoundary.js (Line 1:1 - Line 32:52), frontend/node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.js (Line 1:1 - Line 32:52)
"use client";
// src/QueryErrorResetBoundary.tsx
import * as React from "react";
import { jsx } from "react/jsx-runtime";
function createValue() {
let isReset = false;
return {
clearReset: () => {
isReset = false;
},
reset: () => {
isReset = true;
},
isReset: () => {
return isReset;
}
};
}
var QueryErrorResetBoundaryContext = React.createContext(createValue());
var useQueryErrorResetBoundary = () => React.useContext(QueryErrorResetBoundaryContext);
var QueryErrorResetBoundary = ({
children
}) => {
const [value] = React.useState(() => createValue());
return /* @__PURE__ */ jsx(QueryErrorResetBoundaryContext.Provider, { value, children: typeof children === "function" ? children(value) : children });
};
export {
QueryErrorResetBoundary,
useQueryErrorResetBoundary
};
//# sourceMappingURL=QueryErrorResetBoundary.js.map
frontend/node_modules/@tanstack/react-query/build/legacy/QueryErrorResetBoundary.cjs (Line 1:1 - Line 67:53), frontend/node_modules/@tanstack/react-query/build/modern/useQueries.cjs (Line 1:1 - Line 67:53)
"use strict";
"use client";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/QueryErrorResetBoundary.tsx
var QueryErrorResetBoundary_exports = {};
__export(QueryErrorResetBoundary_exports, {
QueryErrorResetBoundary: () => QueryErrorResetBoundary,
useQueryErrorResetBoundary: () => useQueryErrorResetBoundary
});
module.exports = __toCommonJS(QueryErrorResetBoundary_exports);
var React = __toESM(require("react"), 1);
var import_jsx_runtime = require("react/jsx-runtime");
function createValue() {
let isReset = false;
return {
clearReset: () => {
isReset = false;
},
reset: () => {
isReset = true;
},
isReset: () => {
return isReset;
}
};
}
var QueryErrorResetBoundaryContext = React.createContext(createValue());
var useQueryErrorResetBoundary = () => React.useContext(QueryErrorResetBoundaryContext);
var QueryErrorResetBoundary = ({
children
}) => {
const [value] = React.useState(() => createValue());
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(QueryErrorResetBoundaryContext.Provider, { value, children: typeof children === "function" ? children(value) : children });
};
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
QueryErrorResetBoundary,
useQueryErrorResetBoundary
});
//# sourceMappingURL=QueryErrorResetBoundary.cjs.map
frontend/node_modules/@tanstack/react-query/build/legacy/QueryClientProvider.js (Line 1:1 - Line 36:48), frontend/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js (Line 1:1 - Line 36:48)
"use client";
// src/QueryClientProvider.tsx
import * as React from "react";
import { jsx } from "react/jsx-runtime";
var QueryClientContext = React.createContext(
void 0
);
var useQueryClient = (queryClient) => {
const client = React.useContext(QueryClientContext);
if (queryClient) {
return queryClient;
}
if (!client) {
throw new Error("No QueryClient set, use QueryClientProvider to set one");
}
return client;
};
var QueryClientProvider = ({
client,
children
}) => {
React.useEffect(() => {
client.mount();
return () => {
client.unmount();
};
}, [client]);
return /* @__PURE__ */ jsx(QueryClientContext.Provider, { value: client, children });
};
export {
QueryClientContext,
QueryClientProvider,
useQueryClient
};
//# sourceMappingURL=QueryClientProvider.js.map
frontend/node_modules/@tanstack/react-query/build/legacy/QueryClientProvider.cjs (Line 1:1 - Line 72:49), frontend/node_modules/@tanstack/react-query/build/modern/useQueries.cjs (Line 1:1 - Line 72:49)
"use strict";
"use client";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/QueryClientProvider.tsx
var QueryClientProvider_exports = {};
__export(QueryClientProvider_exports, {
QueryClientContext: () => QueryClientContext,
QueryClientProvider: () => QueryClientProvider,
useQueryClient: () => useQueryClient
});
module.exports = __toCommonJS(QueryClientProvider_exports);
var React = __toESM(require("react"), 1);
var import_jsx_runtime = require("react/jsx-runtime");
var QueryClientContext = React.createContext(
void 0
);
var useQueryClient = (queryClient) => {
const client = React.useContext(QueryClientContext);
if (queryClient) {
return queryClient;
}
if (!client) {
throw new Error("No QueryClient set, use QueryClientProvider to set one");
}
return client;
};
var QueryClientProvider = ({
client,
children
}) => {
React.useEffect(() => {
client.mount();
return () => {
client.unmount();
};
}, [client]);
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(QueryClientContext.Provider, { value: client, children });
};
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
QueryClientContext,
QueryClientProvider,
useQueryClient
});
//# sourceMappingURL=QueryClientProvider.cjs.map
frontend/node_modules/@tanstack/react-query/build/legacy/IsRestoringProvider.cjs (Line 1:1 - Line 47:49), frontend/node_modules/@tanstack/react-query/build/modern/useQueries.cjs (Line 1:1 - Line 47:49)
"use strict";
"use client";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/IsRestoringProvider.ts
var IsRestoringProvider_exports = {};
__export(IsRestoringProvider_exports, {
IsRestoringProvider: () => IsRestoringProvider,
useIsRestoring: () => useIsRestoring
});
module.exports = __toCommonJS(IsRestoringProvider_exports);
var React = __toESM(require("react"), 1);
var IsRestoringContext = React.createContext(false);
var useIsRestoring = () => React.useContext(IsRestoringContext);
var IsRestoringProvider = IsRestoringContext.Provider;
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
IsRestoringProvider,
useIsRestoring
});
//# sourceMappingURL=IsRestoringProvider.cjs.map
frontend/node_modules/@tanstack/react-query/build/legacy/HydrationBoundary.js (Line 1:1 - Line 55:46), frontend/node_modules/@tanstack/react-query/build/modern/HydrationBoundary.js (Line 1:1 - Line 55:46)
frontend/node_modules/@tanstack/query-core/build/modern/queryClient.cjs (Line 59:2 - Line 98:2), frontend/node_modules/@tanstack/query-core/build/modern/queryClient.js (Line 43:2 - Line 82:17)
onlineManager.subscribe(async (online) => {
if (online) {
await this.resumePausedMutations();
this.#queryCache.onOnline();
}
});
}
unmount() {
this.#mountCount--;
if (this.#mountCount !== 0) return;
this.#unsubscribeFocus?.();
this.#unsubscribeFocus = void 0;
this.#unsubscribeOnline?.();
this.#unsubscribeOnline = void 0;
}
isFetching(filters) {
return this.#queryCache.findAll({ ...filters, fetchStatus: "fetching" }).length;
}
isMutating(filters) {
return this.#mutationCache.findAll({ ...filters, status: "pending" }).length;
}
/**
* Imperative (non-reactive) way to retrieve data for a QueryKey.
* Should only be used in callbacks or functions where reading the latest data is necessary, e.g. for optimistic updates.
*
* Hint: Do not use this function inside a component, because it won't receive updates.
* Use `useQuery` to create a `QueryObserver` that subscribes to changes.
*/
getQueryData(queryKey) {
const options = this.defaultQueryOptions({ queryKey });
return this.#queryCache.get(options.queryHash)?.state.data;
}
ensureQueryData(options) {
const defaultedOptions = this.defaultQueryOptions(options);
const query = this.#queryCache.build(this, defaultedOptions);
const cachedData = query.state.data;
if (cachedData === void 0) {
return this.fetchQuery(options);
}
if (options.revalidateIfStale && query.isStaleByTime((
frontend/node_modules/@tanstack/query-core/build/modern/queryClient.cjs (Line 98:2 - Line 115:2), frontend/node_modules/@tanstack/query-core/build/modern/queryClient.js (Line 82:17 - Line 99:17)
frontend/node_modules/@tanstack/query-core/build/modern/notifyManager.cjs (Line 1:1 - Line 20:24), frontend/node_modules/@tanstack/react-query/build/modern/usePrefetchQuery.cjs (Line 1:1 - Line 21:27)
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/notifyManager.ts
frontend/node_modules/@tanstack/query-core/build/modern/notifyManager.cjs (Line 28:1 - Line 106:62), frontend/node_modules/@tanstack/query-core/build/modern/notifyManager.js (Line 2:1 - Line 80:7)
var defaultScheduler = (cb) => setTimeout(cb, 0);
function createNotifyManager() {
let queue = [];
let transactions = 0;
let notifyFn = (callback) => {
callback();
};
let batchNotifyFn = (callback) => {
callback();
};
let scheduleFn = defaultScheduler;
const schedule = (callback) => {
if (transactions) {
queue.push(callback);
} else {
scheduleFn(() => {
notifyFn(callback);
});
}
};
const flush = () => {
const originalQueue = queue;
queue = [];
if (originalQueue.length) {
scheduleFn(() => {
batchNotifyFn(() => {
originalQueue.forEach((callback) => {
notifyFn(callback);
});
});
});
}
};
return {
batch: (callback) => {
let result;
transactions++;
try {
result = callback();
} finally {
transactions--;
if (!transactions) {
flush();
}
}
return result;
},
/**
* All calls to the wrapped function will be batched.
*/
batchCalls: (callback) => {
return (...args) => {
schedule(() => {
callback(...args);
});
};
},
schedule,
/**
* Use this method to set a custom notify function.
* This can be used to for example wrap notifications with `React.act` while running tests.
*/
setNotifyFunction: (fn) => {
notifyFn = fn;
},
/**
* Use this method to set a custom function to batch notifications together into a single tick.
* By default React Query will use the batch function provided by ReactDOM or React Native.
*/
setBatchNotifyFunction: (fn) => {
batchNotifyFn = fn;
},
setScheduler: (fn) => {
scheduleFn = fn;
}
};
}
var notifyManager = createNotifyManager();
// Annotate the CommonJS export names for ESM import in node:
frontend/node_modules/@tanstack/query-core/build/modern/mutationObserver.cjs (Line 1:1 - Line 20:27), frontend/node_modules/@tanstack/react-query/build/modern/usePrefetchQuery.cjs (Line 1:1 - Line 21:27)
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/mutationObserver.ts
frontend/node_modules/@tanstack/query-core/build/modern/mutationObserver.cjs (Line 30:2 - Line 49:2), frontend/node_modules/@tanstack/query-core/build/modern/mutationObserver.js (Line 6:2 - Line 25:20)
frontend/node_modules/@tanstack/query-core/build/legacy/streamedQuery.cjs (Line 1:1 - Line 69:43), frontend/node_modules/@tanstack/react-query/build/modern/usePrefetchQuery.cjs (Line 1:1 - Line 69:43)
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/streamedQuery.ts
var streamedQuery_exports = {};
__export(streamedQuery_exports, {
streamedQuery: () => streamedQuery
});
module.exports = __toCommonJS(streamedQuery_exports);
var import_utils = require("./utils.cjs");
function streamedQuery({
queryFn,
refetchMode = "reset",
maxChunks
}) {
return async (context) => {
const query = context.client.getQueryCache().find({ queryKey: context.queryKey, exact: true });
const isRefetch = !!query && query.state.data !== void 0;
if (isRefetch && refetchMode === "reset") {
query.setState({
status: "pending",
data: void 0,
error: null,
fetchStatus: "fetching"
});
}
let result = [];
const stream = await queryFn(context);
for await (const chunk of stream) {
if (context.signal.aborted) {
break;
}
if (!isRefetch || refetchMode !== "replace") {
context.client.setQueryData(
context.queryKey,
(prev = []) => {
return (0, import_utils.addToEnd)(prev, chunk, maxChunks);
}
);
}
result = (0, import_utils.addToEnd)(result, chunk, maxChunks);
}
if (isRefetch && refetchMode === "replace" && !context.signal.aborted) {
context.client.setQueryData(context.queryKey, result);
}
return context.client.getQueryData(context.queryKey);
};
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
streamedQuery
});
//# sourceMappingURL=streamedQuery.cjs.map
frontend/node_modules/@tanstack/query-core/build/legacy/retryer.js (Line 3:1 - Line 17:3), frontend/node_modules/@tanstack/query-core/build/modern/retryer.js (Line 1:1 - Line 15:2)
// src/retryer.ts
import { focusManager } from "./focusManager.js";
import { onlineManager } from "./onlineManager.js";
import { pendingThenable } from "./thenable.js";
import { isServer, sleep } from "./utils.js";
function defaultRetryDelay(failureCount) {
return Math.min(1e3 * 2 ** failureCount, 3e4);
}
function canFetch(networkMode) {
return (networkMode ?? "online") === "online" ? onlineManager.isOnline() : true;
}
var CancelledError = class extends Error {
constructor(options) {
super("CancelledError");
this.revert = options ==
frontend/node_modules/@tanstack/query-core/build/legacy/retryer.js (Line 18:8 - Line 31:4), frontend/node_modules/@tanstack/query-core/build/modern/retryer.js (Line 16:2 - Line 29:3)
.silent;
}
};
function isCancelledError(value) {
return value instanceof CancelledError;
}
function createRetryer(config) {
let isRetryCancelled = false;
let failureCount = 0;
let isResolved = false;
let continueFn;
const thenable = pendingThenable();
const cancel = (cancelOptions) => {
var
frontend/node_modules/@tanstack/query-core/build/legacy/retryer.js (Line 34:7 - Line 46:4), frontend/node_modules/@tanstack/query-core/build/modern/retryer.js (Line 31:2 - Line 43:3)
frontend/node_modules/@tanstack/query-core/build/legacy/retryer.cjs (Line 1:1 - Line 42:3), frontend/node_modules/@tanstack/react-query/build/modern/usePrefetchQuery.cjs (Line 1:1 - Line 42:2)
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/retryer.ts
var retryer_exports = {};
__export(retryer_exports, {
CancelledError: () => CancelledError,
canFetch: () => canFetch,
createRetryer: () => createRetryer,
isCancelledError: () => isCancelledError
});
module.exports = __toCommonJS(retryer_exports);
var import_focusManager = require("./focusManager.cjs");
var import_onlineManager = require("./onlineManager.cjs");
var import_thenable = require("./thenable.cjs");
var import_utils = require("./utils.cjs");
function defaultRetryDelay(failureCount) {
return Math.min(1e3 * 2 ** failureCount, 3e4);
}
function canFetch(networkMode) {
return (networkMode ?? "online") === "online" ? import_onlineManager.onlineManager.isOnline() : true;
}
var CancelledError = class extends Error {
constructor(options) {
super("CancelledError");
this.revert = options ==
frontend/node_modules/@tanstack/query-core/build/legacy/retryer.cjs (Line 37:2 - Line 54:2), frontend/node_modules/@tanstack/query-core/build/legacy/retryer.js (Line 12:2 - Line 29:16)
onlineManager.isOnline() : true;
}
var CancelledError = class extends Error {
constructor(options) {
super("CancelledError");
this.revert = options == null ? void 0 : options.revert;
this.silent = options == null ? void 0 : options.silent;
}
};
function isCancelledError(value) {
return value instanceof CancelledError;
}
function createRetryer(config) {
let isRetryCancelled = false;
let failureCount = 0;
let isResolved = false;
let continueFn;
const thenable = (
frontend/node_modules/@tanstack/query-core/build/legacy/retryer.cjs (Line 43:8 - Line 56:4), frontend/node_modules/@tanstack/query-core/build/modern/retryer.cjs (Line 43:2 - Line 56:3)
.silent;
}
};
function isCancelledError(value) {
return value instanceof CancelledError;
}
function createRetryer(config) {
let isRetryCancelled = false;
let failureCount = 0;
let isResolved = false;
let continueFn;
const thenable = (0, import_thenable.pendingThenable)();
const cancel = (cancelOptions) => {
var
frontend/node_modules/@tanstack/query-core/build/legacy/retryer.cjs (Line 54:2 - Line 68:20), frontend/node_modules/@tanstack/query-core/build/legacy/retryer.js (Line 29:16 - Line 43:13)
frontend/node_modules/@tanstack/query-core/build/legacy/queryObserver.cjs (Line 1:1 - Line 26:4), frontend/node_modules/@tanstack/query-core/build/legacy/removable.cjs (Line 1:1 - Line 27:20)
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __typeError = (msg) => {
throw TypeError(msg);
};
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
var
frontend/node_modules/@tanstack/query-core/build/legacy/queryObserver.cjs (Line 26:7 - Line 40:8), frontend/node_modules/@tanstack/query-core/build/modern/queryObserver.cjs (Line 18:4 - Line 32:14)
);
// src/queryObserver.ts
var queryObserver_exports = {};
__export(queryObserver_exports, {
QueryObserver: () => QueryObserver
});
module.exports = __toCommonJS(queryObserver_exports);
var import_focusManager = require("./focusManager.cjs");
var import_notifyManager = require("./notifyManager.cjs");
var import_query = require("./query.cjs");
var import_subscribable = require("./subscribable.cjs");
var import_thenable = require("./thenable.cjs");
var import_utils = require("./utils.cjs");
var _client
frontend/node_modules/@tanstack/query-core/build/legacy/queryObserver.cjs (Line 41:2 - Line 65:2), frontend/node_modules/@tanstack/query-core/build/legacy/queryObserver.js (Line 25:2 - Line 49:16)
Subscribable {
constructor(client, options) {
super();
this.options = options;
__privateAdd(this, _QueryObserver_instances);
__privateAdd(this, _client);
__privateAdd(this, _currentQuery);
__privateAdd(this, _currentQueryInitialState);
__privateAdd(this, _currentResult);
__privateAdd(this, _currentResultState);
__privateAdd(this, _currentResultOptions);
__privateAdd(this, _currentThenable);
__privateAdd(this, _selectError);
__privateAdd(this, _selectFn);
__privateAdd(this, _selectResult);
// This property keeps track of the last query with defined data.
// It will be used to pass the previous data and query to the placeholder function between renders.
__privateAdd(this, _lastQueryWithDefinedData);
__privateAdd(this, _staleTimeoutId);
__privateAdd(this, _refetchIntervalId);
__privateAdd(this, _currentRefetchInterval);
__privateAdd(this, _trackedProps, /* @__PURE__ */ new Set());
__privateSet(this, _client, client);
__privateSet(this, _selectError, null);
__privateSet(this, _currentThenable, (
frontend/node_modules/@tanstack/query-core/build/legacy/queryObserver.cjs (Line 65:2 - Line 117:2), frontend/node_modules/@tanstack/query-core/build/legacy/queryObserver.js (Line 49:16 - Line 101:15)
frontend/node_modules/@tanstack/query-core/build/legacy/queryObserver.cjs (Line 117:2 - Line 124:2), frontend/node_modules/@tanstack/query-core/build/legacy/queryObserver.js (Line 101:15 - Line 108:20)
(this.options.enabled, __privateGet(this, _currentQuery)) !== "boolean") {
throw new Error(
"Expected enabled to be a boolean or a callback that returns a boolean"
);
}
__privateMethod(this, _QueryObserver_instances, updateQuery_fn).call(this);
__privateGet(this, _currentQuery).setOptions(this.options);
if (prevOptions._defaulted && !(
frontend/node_modules/@tanstack/query-core/build/legacy/queryObserver.cjs (Line 124:2 - Line 141:2), frontend/node_modules/@tanstack/query-core/build/legacy/queryObserver.js (Line 108:20 - Line 125:15)
frontend/node_modules/@tanstack/query-core/build/legacy/query.js (Line 143:2 - Line 150:13), frontend/node_modules/@tanstack/query-core/build/modern/query.js (Line 130:7 - Line 137:5)
.notify({ type: "observerAdded", query: this, observer });
}
}
removeObserver(observer) {
if (this.observers.includes(observer)) {
this.observers = this.observers.filter((x) => x !== observer);
if (!this.observers.length) {
if (__privateGet
frontend/node_modules/@tanstack/query-core/build/legacy/query.js (Line 177:2 - Line 201:13), frontend/node_modules/@tanstack/query-core/build/modern/query.js (Line 163:9 - Line 187:5)
.promise;
}
}
if (options) {
this.setOptions(options);
}
if (!this.options.queryFn) {
const observer = this.observers.find((x) => x.options.queryFn);
if (observer) {
this.setOptions(observer.options);
}
}
if (process.env.NODE_ENV !== "production") {
if (!Array.isArray(this.options.queryKey)) {
console.error(
`As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']`
);
}
}
const abortController = new AbortController();
const addSignalProperty = (object) => {
Object.defineProperty(object, "signal", {
enumerable: true,
get: () => {
__privateSet
frontend/node_modules/@tanstack/query-core/build/legacy/query.js (Line 218:2 - Line 233:13), frontend/node_modules/@tanstack/query-core/build/modern/query.js (Line 204:6 - Line 219:5)
frontend/node_modules/@tanstack/query-core/build/legacy/query.js (Line 275:9 - Line 290:2), frontend/node_modules/@tanstack/query-core/build/modern/query.js (Line 257:9 - Line 272:5)
if (data === void 0) {
if (process.env.NODE_ENV !== "production") {
console.error(
`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`
);
}
onError(new Error(`${this.queryHash} data is undefined`));
return;
}
try {
this.setData(data);
} catch (error) {
onError(error);
return;
}
(
frontend/node_modules/@tanstack/query-core/build/legacy/query.js (Line 325:9 - Line 351:13), frontend/node_modules/@tanstack/query-core/build/modern/query.js (Line 297:9 - Line 323:5)
frontend/node_modules/@tanstack/query-core/build/legacy/notifyManager.js (Line 3:1 - Line 87:42), frontend/node_modules/@tanstack/query-core/build/modern/notifyManager.js (Line 1:1 - Line 85:42)
// src/notifyManager.ts
var defaultScheduler = (cb) => setTimeout(cb, 0);
function createNotifyManager() {
let queue = [];
let transactions = 0;
let notifyFn = (callback) => {
callback();
};
let batchNotifyFn = (callback) => {
callback();
};
let scheduleFn = defaultScheduler;
const schedule = (callback) => {
if (transactions) {
queue.push(callback);
} else {
scheduleFn(() => {
notifyFn(callback);
});
}
};
const flush = () => {
const originalQueue = queue;
queue = [];
if (originalQueue.length) {
scheduleFn(() => {
batchNotifyFn(() => {
originalQueue.forEach((callback) => {
notifyFn(callback);
});
});
});
}
};
return {
batch: (callback) => {
let result;
transactions++;
try {
result = callback();
} finally {
transactions--;
if (!transactions) {
flush();
}
}
return result;
},
/**
* All calls to the wrapped function will be batched.
*/
batchCalls: (callback) => {
return (...args) => {
schedule(() => {
callback(...args);
});
};
},
schedule,
/**
* Use this method to set a custom notify function.
* This can be used to for example wrap notifications with `React.act` while running tests.
*/
setNotifyFunction: (fn) => {
notifyFn = fn;
},
/**
* Use this method to set a custom function to batch notifications together into a single tick.
* By default React Query will use the batch function provided by ReactDOM or React Native.
*/
setBatchNotifyFunction: (fn) => {
batchNotifyFn = fn;
},
setScheduler: (fn) => {
scheduleFn = fn;
}
};
}
var notifyManager = createNotifyManager();
export {
createNotifyManager,
defaultScheduler,
notifyManager
};
//# sourceMappingURL=notifyManager.js.map
frontend/node_modules/@tanstack/query-core/build/legacy/notifyManager.cjs (Line 1:1 - Line 112:43), frontend/node_modules/@tanstack/react-query/build/modern/usePrefetchQuery.cjs (Line 1:1 - Line 112:43)
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/notifyManager.ts
var notifyManager_exports = {};
__export(notifyManager_exports, {
createNotifyManager: () => createNotifyManager,
defaultScheduler: () => defaultScheduler,
notifyManager: () => notifyManager
});
module.exports = __toCommonJS(notifyManager_exports);
var defaultScheduler = (cb) => setTimeout(cb, 0);
function createNotifyManager() {
let queue = [];
let transactions = 0;
let notifyFn = (callback) => {
callback();
};
let batchNotifyFn = (callback) => {
callback();
};
let scheduleFn = defaultScheduler;
const schedule = (callback) => {
if (transactions) {
queue.push(callback);
} else {
scheduleFn(() => {
notifyFn(callback);
});
}
};
const flush = () => {
const originalQueue = queue;
queue = [];
if (originalQueue.length) {
scheduleFn(() => {
batchNotifyFn(() => {
originalQueue.forEach((callback) => {
notifyFn(callback);
});
});
});
}
};
return {
batch: (callback) => {
let result;
transactions++;
try {
result = callback();
} finally {
transactions--;
if (!transactions) {
flush();
}
}
return result;
},
/**
* All calls to the wrapped function will be batched.
*/
batchCalls: (callback) => {
return (...args) => {
schedule(() => {
callback(...args);
});
};
},
schedule,
/**
* Use this method to set a custom notify function.
* This can be used to for example wrap notifications with `React.act` while running tests.
*/
setNotifyFunction: (fn) => {
notifyFn = fn;
},
/**
* Use this method to set a custom function to batch notifications together into a single tick.
* By default React Query will use the batch function provided by ReactDOM or React Native.
*/
setBatchNotifyFunction: (fn) => {
batchNotifyFn = fn;
},
setScheduler: (fn) => {
scheduleFn = fn;
}
};
}
var notifyManager = createNotifyManager();
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
createNotifyManager,
defaultScheduler,
notifyManager
});
//# sourceMappingURL=notifyManager.cjs.map
frontend/node_modules/@tanstack/query-core/build/legacy/mutationObserver.cjs (Line 1:1 - Line 28:27), frontend/node_modules/@tanstack/query-core/build/legacy/removable.cjs (Line 1:1 - Line 28:24)
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __typeError = (msg) => {
throw TypeError(msg);
};
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
// src/mutationObserver.ts
frontend/node_modules/@tanstack/query-core/build/legacy/mutationObserver.cjs (Line 26:7 - Line 38:8), frontend/node_modules/@tanstack/query-core/build/modern/mutationObserver.cjs (Line 18:4 - Line 30:17)
);
// src/mutationObserver.ts
var mutationObserver_exports = {};
__export(mutationObserver_exports, {
MutationObserver: () => MutationObserver
});
module.exports = __toCommonJS(mutationObserver_exports);
var import_mutation = require("./mutation.cjs");
var import_notifyManager = require("./notifyManager.cjs");
var import_subscribable = require("./subscribable.cjs");
var import_utils = require("./utils.cjs");
var _client
frontend/node_modules/@tanstack/query-core/build/legacy/mutationObserver.cjs (Line 39:2 - Line 60:2), frontend/node_modules/@tanstack/query-core/build/legacy/mutationObserver.js (Line 14:2 - Line 35:20)
frontend/node_modules/@tanstack/query-core/build/legacy/hydration.js (Line 29:3 - Line 54:4), frontend/node_modules/@tanstack/query-core/build/modern/hydration.js (Line 26:2 - Line 51:6)
.then(serializeData).catch((error) => {
if (!shouldRedactErrors(error)) {
return Promise.reject(error);
}
if (process.env.NODE_ENV !== "production") {
console.error(
`A query that was dehydrated as pending ended up rejecting. [${query.queryHash}]: ${error}; The error will be redacted in production builds`
);
}
return Promise.reject(new Error("redacted"));
})
},
...query.meta && { meta: query.meta }
};
}
function defaultShouldDehydrateMutation(mutation) {
return mutation.state.isPaused;
}
function defaultShouldDehydrateQuery(query) {
return query.state.status === "success";
}
function defaultShouldRedactErrors(_) {
return true;
}
function dehydrate(client, options = {}) {
var
frontend/node_modules/@tanstack/query-core/build/legacy/hydration.js (Line 61:2 - Line 68:4), frontend/node_modules/@tanstack/query-core/build/modern/hydration.js (Line 57:2 - Line 64:3)
frontend/node_modules/@tanstack/query-core/build/legacy/hydration.js (Line 97:2 - Line 113:2), frontend/node_modules/@tanstack/query-core/build/modern/hydration.js (Line 90:2 - Line 106:7)
=== "fetching";
if (query) {
const hasNewerSyncData = syncData && // We only need this undefined check to handle older dehydration
// payloads that might not have dehydratedAt
dehydratedAt !== void 0 && dehydratedAt > query.state.dataUpdatedAt;
if (state.dataUpdatedAt > query.state.dataUpdatedAt || hasNewerSyncData) {
const { fetchStatus: _ignored, ...serializedState } = state;
query.setState({
...serializedState,
data
});
}
} else {
query = queryCache.build(
client,
{
...(
frontend/node_modules/@tanstack/query-core/build/legacy/hydration.js (Line 114:4 - Line 146:38), frontend/node_modules/@tanstack/query-core/build/modern/hydration.js (Line 107:2 - Line 139:38)
.queries,
queryKey,
queryHash,
meta
},
// Reset fetch status to idle to avoid
// query being stuck in fetching state upon hydration
{
...state,
data,
fetchStatus: "idle",
status: data !== void 0 ? "success" : state.status
}
);
}
if (promise && !existingQueryIsPending && !existingQueryIsFetching && // Only hydrate if dehydration is newer than any existing data,
// this is always true for new queries
(dehydratedAt === void 0 || dehydratedAt > query.state.dataUpdatedAt)) {
void query.fetch(void 0, {
// RSC transformed promises are not thenable
initialPromise: Promise.resolve(promise).then(deserializeData)
});
}
}
);
}
export {
defaultShouldDehydrateMutation,
defaultShouldDehydrateQuery,
dehydrate,
hydrate
};
//# sourceMappingURL=hydration.js.map
frontend/node_modules/@tanstack/query-core/build/legacy/hydration.cjs (Line 1:1 - Line 117:2), frontend/node_modules/@tanstack/react-query/build/modern/usePrefetchQuery.cjs (Line 1:1 - Line 92:15)
frontend/node_modules/@tanstack/query-core/build/legacy/chunk-PXG64RU4.js (Line 3:2 - Line 9:4), frontend/node_modules/@tanstack/query-core/build/legacy/removable.cjs (Line 21:2 - Line 28:24)
;
var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
var
frontend/node_modules/@tanstack/query-core/build/legacy/chunk-PXG64RU4.js (Line 8:7 - Line 18:7), frontend/node_modules/@tanstack/query-core/build/legacy/queryClient.cjs (Line 25:6 - Line 35:22)
);
var __privateWrapper = (obj, member, setter, getter) => ({
set _(value) {
__privateSet(obj, member, value, setter);
},
get _() {
return __privateGet(obj, member, getter);
}
});
export
frontend/shared/node_modules/typescript/lib/watchGuard.js (Line 22:15 - Line 41:32), frontend/node_modules/@tanstack/react-query/build/modern/types.cjs (Line 4:20 - Line 29:4)
;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
// src/watchGuard/watchGuard.ts
frontend/shared/node_modules/typescript/lib/_typingsInstaller.js (Line 1:1 - Line 33:8), frontend/shared/node_modules/typescript/lib/watchGuard.js (Line 1:1 - Line 19:13)
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
var __toESM
frontend/shared/node_modules/typescript/lib/_typingsInstaller.js (Line 32:2 - Line 42:48), frontend/node_modules/@tanstack/react-query/build/modern/useQueries.cjs (Line 20:2 - Line 29:4)
;
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
// src/typingsInstaller/nodeTypingsInstaller.ts
frontend/shared/node_modules/typescript/lib/_tsserver.js (Line 1:1 - Line 42:26), frontend/shared/node_modules/typescript/lib/watchGuard.js (Line 1:1 - Line 29:4)
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
// src/tsserver/server.ts
frontend/node_modules/zustand/umd/react/shallow.development.js (Line 5:13 - Line 79:4), frontend/node_modules/zustand/umd/vanilla/shallow.development.js (Line 5:8 - Line 79:8)
) { 'use strict';
function _arrayLikeToArray(r, a) {
(null == a || a > r.length) && (a = r.length);
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
return n;
}
function _createForOfIteratorHelperLoose(r, e) {
var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
if (t) return (t = t.call(r)).next.bind(t);
if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e) {
t && (r = t);
var o = 0;
return function () {
return o >= r.length ? {
done: !0
} : {
done: !1,
value: r[o++]
};
};
}
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
function _unsupportedIterableToArray(r, a) {
if (r) {
if ("string" == typeof r) return _arrayLikeToArray(r, a);
var t = {}.toString.call(r).slice(8, -1);
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
}
}
function shallow(objA, objB) {
if (Object.is(objA, objB)) {
return true;
}
if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {
return false;
}
if (objA instanceof Map && objB instanceof Map) {
if (objA.size !== objB.size) return false;
for (var _iterator = _createForOfIteratorHelperLoose(objA), _step; !(_step = _iterator()).done;) {
var _step$value = _step.value,
key = _step$value[0],
value = _step$value[1];
if (!Object.is(value, objB.get(key))) {
return false;
}
}
return true;
}
if (objA instanceof Set && objB instanceof Set) {
if (objA.size !== objB.size) return false;
for (var _iterator2 = _createForOfIteratorHelperLoose(objA), _step2; !(_step2 = _iterator2()).done;) {
var _value = _step2.value;
if (!objB.has(_value)) {
return false;
}
}
return true;
}
var keysA = Object.keys(objA);
if (keysA.length !== Object.keys(objB).length) {
return false;
}
for (var _i = 0, _keysA = keysA; _i < _keysA.length; _i++) {
var keyA = _keysA[_i];
if (!Object.prototype.hasOwnProperty.call(objB, keyA) || !Object.is(objA[keyA], objB[keyA])) {
return false;
}
}
return true;
}
var
frontend/node_modules/zustand/system/vanilla/shallow.development.js (Line 18:13 - Line 26:6), frontend/node_modules/zustand/umd/vanilla/shallow.development.js (Line 50:9 - Line 58:4)
if (!Object.is(value, objB.get(key))) {
return false;
}
}
return true;
}
if (objA instanceof Set && objB instanceof Set) {
if (objA.size !== objB.size) return false;
for (const
frontend/node_modules/zustand/system/react/shallow.development.js (Line 10:11 - Line 49:6), frontend/node_modules/zustand/system/vanilla/shallow.development.js (Line 6:8 - Line 45:2)
);
function shallow(objA, objB) {
if (Object.is(objA, objB)) {
return true;
}
if (typeof objA !== "object" || objA === null || typeof objB !== "object" || objB === null) {
return false;
}
if (objA instanceof Map && objB instanceof Map) {
if (objA.size !== objB.size) return false;
for (const [key, value] of objA) {
if (!Object.is(value, objB.get(key))) {
return false;
}
}
return true;
}
if (objA instanceof Set && objB instanceof Set) {
if (objA.size !== objB.size) return false;
for (const value of objA) {
if (!objB.has(value)) {
return false;
}
}
return true;
}
const keysA = Object.keys(objA);
if (keysA.length !== Object.keys(objB).length) {
return false;
}
for (const keyA of keysA) {
if (!Object.prototype.hasOwnProperty.call(objB, keyA) || !Object.is(objA[keyA], objB[keyA])) {
return false;
}
}
return true;
}
const
frontend/node_modules/zustand/esm/vanilla/shallow.mjs (Line 1:1 - Line 38:7), frontend/node_modules/zustand/system/vanilla/shallow.development.js (Line 8:7 - Line 45:2)
function shallow(objA, objB) {
if (Object.is(objA, objB)) {
return true;
}
if (typeof objA !== "object" || objA === null || typeof objB !== "object" || objB === null) {
return false;
}
if (objA instanceof Map && objB instanceof Map) {
if (objA.size !== objB.size) return false;
for (const [key, value] of objA) {
if (!Object.is(value, objB.get(key))) {
return false;
}
}
return true;
}
if (objA instanceof Set && objB instanceof Set) {
if (objA.size !== objB.size) return false;
for (const value of objA) {
if (!objB.has(value)) {
return false;
}
}
return true;
}
const keysA = Object.keys(objA);
if (keysA.length !== Object.keys(objB).length) {
return false;
}
for (const keyA of keysA) {
if (!Object.prototype.hasOwnProperty.call(objB, keyA) || !Object.is(objA[keyA], objB[keyA])) {
return false;
}
}
return true;
}
export
frontend/node_modules/zustand/esm/vanilla/shallow.js (Line 1:1 - Line 38:2), frontend/node_modules/zustand/system/vanilla/shallow.development.js (Line 8:7 - Line 38:2)
function shallow(objA, objB) {
if (Object.is(objA, objB)) {
return true;
}
if (typeof objA !== "object" || objA === null || typeof objB !== "object" || objB === null) {
return false;
}
if (objA instanceof Map && objB instanceof Map) {
if (objA.size !== objB.size) return false;
for (const [key, value] of objA) {
if (!Object.is(value, objB.get(key))) {
return false;
}
}
return true;
}
if (objA instanceof Set && objB instanceof Set) {
if (objA.size !== objB.size) return false;
for (const value of objA) {
if (!objB.has(value)) {
return false;
}
}
return true;
}
const keysA = Object.keys(objA);
if (keysA.length !== Object.keys(objB).length) {
return false;
}
for (const keyA of keysA) {
if (!Object.prototype.hasOwnProperty.call(objB, keyA) || !Object.is(objA[keyA], objB[keyA])) {
return false;
}
}
return true;
}
export { shallow };
frontend/node_modules/zustand/esm/react/shallow.mjs (Line 1:8 - Line 49:7), frontend/node_modules/zustand/system/vanilla/shallow.development.js (Line 6:2 - Line 58:2)
;
function shallow(objA, objB) {
if (Object.is(objA, objB)) {
return true;
}
if (typeof objA !== "object" || objA === null || typeof objB !== "object" || objB === null) {
return false;
}
if (objA instanceof Map && objB instanceof Map) {
if (objA.size !== objB.size) return false;
for (const [key, value] of objA) {
if (!Object.is(value, objB.get(key))) {
return false;
}
}
return true;
}
if (objA instanceof Set && objB instanceof Set) {
if (objA.size !== objB.size) return false;
for (const value of objA) {
if (!objB.has(value)) {
return false;
}
}
return true;
}
const keysA = Object.keys(objA);
if (keysA.length !== Object.keys(objB).length) {
return false;
}
for (const keyA of keysA) {
if (!Object.prototype.hasOwnProperty.call(objB, keyA) || !Object.is(objA[keyA], objB[keyA])) {
return false;
}
}
return true;
}
const { useRef } = ReactExports;
function useShallow(selector) {
const prev = useRef();
return (state) => {
const next = selector(state);
return shallow(prev.current, next) ? prev.current : prev.current = next;
};
}
export
frontend/node_modules/zustand/esm/react/shallow.js (Line 1:1 - Line 49:2), frontend/node_modules/zustand/esm/react/shallow.mjs (Line 1:1 - Line 49:2)
import ReactExports from 'react';
function shallow(objA, objB) {
if (Object.is(objA, objB)) {
return true;
}
if (typeof objA !== "object" || objA === null || typeof objB !== "object" || objB === null) {
return false;
}
if (objA instanceof Map && objB instanceof Map) {
if (objA.size !== objB.size) return false;
for (const [key, value] of objA) {
if (!Object.is(value, objB.get(key))) {
return false;
}
}
return true;
}
if (objA instanceof Set && objB instanceof Set) {
if (objA.size !== objB.size) return false;
for (const value of objA) {
if (!objB.has(value)) {
return false;
}
}
return true;
}
const keysA = Object.keys(objA);
if (keysA.length !== Object.keys(objB).length) {
return false;
}
for (const keyA of keysA) {
if (!Object.prototype.hasOwnProperty.call(objB, keyA) || !Object.is(objA[keyA], objB[keyA])) {
return false;
}
}
return true;
}
const { useRef } = ReactExports;
function useShallow(selector) {
const prev = useRef();
return (state) => {
const next = selector(state);
return shallow(prev.current, next) ? prev.current : prev.current = next;
};
}
export { useShallow };
frontend/node_modules/zustand/esm/middleware/immer.mjs (Line 3:1 - Line 10:10), frontend/node_modules/zustand/system/middleware/immer.development.js (Line 10:7 - Line 17:8)
frontend/node_modules/zod/v4/locales/vi.cjs (Line 1:1 - Line 30:8), frontend/node_modules/zod/v4/mini/schemas.cjs (Line 1:1 - Line 30:5)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = default_1;
const util = __importStar(require("../core/util.cjs"));
const error = () => {
const Sizable = {
string: { unit: "ký tự"
frontend/node_modules/zod/v4/locales/vi.cjs (Line 27:2 - Line 138:9), frontend/node_modules/zod/v4/locales/vi.js (Line 1:18 - Line 112:7)
;
const error = () => {
const Sizable = {
string: { unit: "ký tự", verb: "có" },
file: { unit: "byte", verb: "có" },
array: { unit: "phần tử", verb: "có" },
set: { unit: "phần tử", verb: "có" },
};
function getSizing(origin) {
return Sizable[origin] ?? null;
}
const parsedType = (data) => {
const t = typeof data;
switch (t) {
case "number": {
return Number.isNaN(data) ? "NaN" : "số";
}
case "object": {
if (Array.isArray(data)) {
return "mảng";
}
if (data === null) {
return "null";
}
if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
return data.constructor.name;
}
}
}
return t;
};
const Nouns = {
regex: "đầu vào",
email: "địa chỉ email",
url: "URL",
emoji: "emoji",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "ngày giờ ISO",
date: "ngày ISO",
time: "giờ ISO",
duration: "khoảng thời gian ISO",
ipv4: "địa chỉ IPv4",
ipv6: "địa chỉ IPv6",
cidrv4: "dải IPv4",
cidrv6: "dải IPv6",
base64: "chuỗi mã hóa base64",
base64url: "chuỗi mã hóa base64url",
json_string: "chuỗi JSON",
e164: "số E.164",
jwt: "JWT",
template_literal: "đầu vào",
};
return (issue) => {
switch (issue.code) {
case "invalid_type":
return `Đầu vào không hợp lệ: mong đợi ${issue.expected}, nhận được ${parsedType(issue.input)}`;
case "invalid_value":
if (issue.values.length === 1)
return `Đầu vào không hợp lệ: mong đợi ${util.stringifyPrimitive(issue.values[0])}`;
return `Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${util.joinValues(issue.values, "|")}`;
case "too_big": {
const adj = issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
if (sizing)
return `Quá lớn: mong đợi ${issue.origin ?? "giá trị"} ${sizing.verb} ${adj}${issue.maximum.toString()} ${sizing.unit ?? "phần tử"}`;
return `Quá lớn: mong đợi ${issue.origin ?? "giá trị"} ${adj}${issue.maximum.toString()}`;
}
case "too_small": {
const adj = issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
if (sizing) {
return `Quá nhỏ: mong đợi ${issue.origin} ${sizing.verb} ${adj}${issue.minimum.toString()} ${sizing.unit}`;
}
return `Quá nhỏ: mong đợi ${issue.origin} ${adj}${issue.minimum.toString()}`;
}
case "invalid_format": {
const _issue = issue;
if (_issue.format === "starts_with")
return `Chuỗi không hợp lệ: phải bắt đầu bằng "${_issue.prefix}"`;
if (_issue.format === "ends_with")
return `Chuỗi không hợp lệ: phải kết thúc bằng "${_issue.suffix}"`;
if (_issue.format === "includes")
return `Chuỗi không hợp lệ: phải bao gồm "${_issue.includes}"`;
if (_issue.format === "regex")
return `Chuỗi không hợp lệ: phải khớp với mẫu ${_issue.pattern}`;
return `${Nouns[_issue.format] ?? issue.format} không hợp lệ`;
}
case "not_multiple_of":
return `Số không hợp lệ: phải là bội số của ${issue.divisor}`;
case "unrecognized_keys":
return `Khóa không được nhận dạng: ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `Khóa không hợp lệ trong ${issue.origin}`;
case "invalid_union":
return "Đầu vào không hợp lệ";
case "invalid_element":
return `Giá trị không hợp lệ trong ${issue.origin}`;
default:
return `Đầu vào không hợp lệ`;
}
};
};
function
frontend/node_modules/zod/v4/locales/ur.js (Line 7:2 - Line 16:7), frontend/node_modules/zod/v4/locales/zh-TW.js (Line 7:2 - Line 16:9)
frontend/node_modules/zod/v4/locales/en.cjs (Line 93:2 - Line 141:9), frontend/node_modules/zod/v4/locales/en.js (Line 65:11 - Line 113:7)
(issue.input)}`;
case "invalid_value":
if (issue.values.length === 1)
return `Invalid input: expected ${util.stringifyPrimitive(issue.values[0])}`;
return `Invalid option: expected one of ${util.joinValues(issue.values, "|")}`;
case "too_big": {
const adj = issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
if (sizing)
return `Too big: expected ${issue.origin ?? "value"} to have ${adj}${issue.maximum.toString()} ${sizing.unit ?? "elements"}`;
return `Too big: expected ${issue.origin ?? "value"} to be ${adj}${issue.maximum.toString()}`;
}
case "too_small": {
const adj = issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
if (sizing) {
return `Too small: expected ${issue.origin} to have ${adj}${issue.minimum.toString()} ${sizing.unit}`;
}
return `Too small: expected ${issue.origin} to be ${adj}${issue.minimum.toString()}`;
}
case "invalid_format": {
const _issue = issue;
if (_issue.format === "starts_with") {
return `Invalid string: must start with "${_issue.prefix}"`;
}
if (_issue.format === "ends_with")
return `Invalid string: must end with "${_issue.suffix}"`;
if (_issue.format === "includes")
return `Invalid string: must include "${_issue.includes}"`;
if (_issue.format === "regex")
return `Invalid string: must match pattern ${_issue.pattern}`;
return `Invalid ${Nouns[_issue.format] ?? issue.format}`;
}
case "not_multiple_of":
return `Invalid number: must be a multiple of ${issue.divisor}`;
case "unrecognized_keys":
return `Unrecognized key${issue.keys.length > 1 ? "s" : ""}: ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `Invalid key in ${issue.origin}`;
case "invalid_union":
return "Invalid input";
case "invalid_element":
return `Invalid value in ${issue.origin}`;
default:
return `Invalid input`;
}
};
};
function
frontend/node_modules/zod/v4/locales/de.js (Line 7:2 - Line 16:7), frontend/node_modules/zod/v4/locales/zh-TW.js (Line 7:2 - Line 16:9)
frontend/node_modules/zod/v4/locales/ar.cjs (Line 1:1 - Line 30:6), frontend/node_modules/zod/v4/mini/schemas.cjs (Line 1:1 - Line 30:5)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = default_1;
const util = __importStar(require("../core/util.cjs"));
const error = () => {
const Sizable = {
string: { unit: "حرف"
frontend/node_modules/zod/v4/locales/ar.cjs (Line 27:2 - Line 138:9), frontend/node_modules/zod/v4/locales/ar.js (Line 1:18 - Line 112:7)
;
const error = () => {
const Sizable = {
string: { unit: "حرف", verb: "أن يحوي" },
file: { unit: "بايت", verb: "أن يحوي" },
array: { unit: "عنصر", verb: "أن يحوي" },
set: { unit: "عنصر", verb: "أن يحوي" },
};
function getSizing(origin) {
return Sizable[origin] ?? null;
}
const parsedType = (data) => {
const t = typeof data;
switch (t) {
case "number": {
return Number.isNaN(data) ? "NaN" : "number";
}
case "object": {
if (Array.isArray(data)) {
return "array";
}
if (data === null) {
return "null";
}
if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
return data.constructor.name;
}
}
}
return t;
};
const Nouns = {
regex: "مدخل",
email: "بريد إلكتروني",
url: "رابط",
emoji: "إيموجي",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "تاريخ ووقت بمعيار ISO",
date: "تاريخ بمعيار ISO",
time: "وقت بمعيار ISO",
duration: "مدة بمعيار ISO",
ipv4: "عنوان IPv4",
ipv6: "عنوان IPv6",
cidrv4: "مدى عناوين بصيغة IPv4",
cidrv6: "مدى عناوين بصيغة IPv6",
base64: "نَص بترميز base64-encoded",
base64url: "نَص بترميز base64url-encoded",
json_string: "نَص على هيئة JSON",
e164: "رقم هاتف بمعيار E.164",
jwt: "JWT",
template_literal: "مدخل",
};
return (issue) => {
switch (issue.code) {
case "invalid_type":
return `مدخلات غير مقبولة: يفترض إدخال ${issue.expected}، ولكن تم إدخال ${parsedType(issue.input)}`;
case "invalid_value":
if (issue.values.length === 1)
return `مدخلات غير مقبولة: يفترض إدخال ${util.stringifyPrimitive(issue.values[0])}`;
return `اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${util.joinValues(issue.values, "|")}`;
case "too_big": {
const adj = issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
if (sizing)
return ` أكبر من اللازم: يفترض أن تكون ${issue.origin ?? "القيمة"} ${adj} ${issue.maximum.toString()} ${sizing.unit ?? "عنصر"}`;
return `أكبر من اللازم: يفترض أن تكون ${issue.origin ?? "القيمة"} ${adj} ${issue.maximum.toString()}`;
}
case "too_small": {
const adj = issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
if (sizing) {
return `أصغر من اللازم: يفترض لـ ${issue.origin} أن يكون ${adj} ${issue.minimum.toString()} ${sizing.unit}`;
}
return `أصغر من اللازم: يفترض لـ ${issue.origin} أن يكون ${adj} ${issue.minimum.toString()}`;
}
case "invalid_format": {
const _issue = issue;
if (_issue.format === "starts_with")
return `نَص غير مقبول: يجب أن يبدأ بـ "${issue.prefix}"`;
if (_issue.format === "ends_with")
return `نَص غير مقبول: يجب أن ينتهي بـ "${_issue.suffix}"`;
if (_issue.format === "includes")
return `نَص غير مقبول: يجب أن يتضمَّن "${_issue.includes}"`;
if (_issue.format === "regex")
return `نَص غير مقبول: يجب أن يطابق النمط ${_issue.pattern}`;
return `${Nouns[_issue.format] ?? issue.format} غير مقبول`;
}
case "not_multiple_of":
return `رقم غير مقبول: يجب أن يكون من مضاعفات ${issue.divisor}`;
case "unrecognized_keys":
return `معرف${issue.keys.length > 1 ? "ات" : ""} غريب${issue.keys.length > 1 ? "ة" : ""}: ${util.joinValues(issue.keys, "، ")}`;
case "invalid_key":
return `معرف غير مقبول في ${issue.origin}`;
case "invalid_union":
return "مدخل غير مقبول";
case "invalid_element":
return `مدخل غير مقبول في ${issue.origin}`;
default:
return "مدخل غير مقبول";
}
};
};
function
frontend/node_modules/zod/v4/core/util.js (Line 305:2 - Line 313:7), frontend/node_modules/zod/v4/core/util.js (Line 287:2 - Line 295:12)
};
const currDef = schema._zod.def; //.shape;
for (const key in mask) {
if (!(key in currDef.shape)) {
throw new Error(`Unrecognized key: "${key}"`);
}
if (!mask[key])
continue;
delete
frontend/node_modules/zod/v4/core/util.cjs (Line 57:1 - Line 64:9), frontend/node_modules/zod/v4/core/util.js (Line 13:2 - Line 20:7)
function getEnumValues(entries) {
const numericValues = Object.values(entries).filter((v) => typeof v === "number");
const values = Object.entries(entries)
.filter(([k, _]) => numericValues.indexOf(+k) === -1)
.map(([_, v]) => v);
return values;
}
function
frontend/node_modules/zod/v4/core/util.cjs (Line 72:1 - Line 85:9), frontend/node_modules/zod/v4/core/util.js (Line 28:2 - Line 41:7)
function cached(getter) {
const set = false;
return {
get value() {
if (!set) {
const value = getter();
Object.defineProperty(this, "value", { value });
return value;
}
throw new Error("cached value already set");
},
};
}
function
frontend/node_modules/zod/v4/core/util.cjs (Line 88:1 - Line 93:9), frontend/node_modules/zod/v4/core/util.js (Line 44:2 - Line 49:7)
function cleanRegex(source) {
const start = source.startsWith("^") ? 1 : 0;
const end = source.endsWith("$") ? source.length - 1 : source.length;
return source.slice(start, end);
}
function
frontend/node_modules/zod/v4/core/util.cjs (Line 93:1 - Line 101:9), frontend/node_modules/zod/v4/core/util.js (Line 49:2 - Line 57:7)
frontend/node_modules/zod/v4/core/util.cjs (Line 331:1 - Line 349:9), frontend/node_modules/zod/v4/core/util.js (Line 286:2 - Line 304:7)
function pick(schema, mask) {
const newShape = {};
const currDef = schema._zod.def; //.shape;
for (const key in mask) {
if (!(key in currDef.shape)) {
throw new Error(`Unrecognized key: "${key}"`);
}
if (!mask[key])
continue;
// pick key
newShape[key] = currDef.shape[key];
}
return clone(schema, {
...schema._zod.def,
shape: newShape,
checks: [],
});
}
function
frontend/node_modules/zod/v4/core/util.cjs (Line 349:1 - Line 366:9), frontend/node_modules/zod/v4/core/util.js (Line 304:2 - Line 321:7)
function omit(schema, mask) {
const newShape = { ...schema._zod.def.shape };
const currDef = schema._zod.def; //.shape;
for (const key in mask) {
if (!(key in currDef.shape)) {
throw new Error(`Unrecognized key: "${key}"`);
}
if (!mask[key])
continue;
delete newShape[key];
}
return clone(schema, {
...schema._zod.def,
shape: newShape,
checks: [],
});
}
function
frontend/node_modules/zod/v4/core/util.cjs (Line 366:1 - Line 381:9), frontend/node_modules/zod/v4/core/util.js (Line 321:2 - Line 336:7)
function extend(schema, shape) {
if (!isPlainObject(shape)) {
throw new Error("Invalid input to extend: expected a plain object");
}
const def = {
...schema._zod.def,
get shape() {
const _shape = { ...schema._zod.def.shape, ...shape };
assignProp(this, "shape", _shape); // self-caching
return _shape;
},
checks: [], // delete existing checks
};
return clone(schema, def);
}
function
frontend/node_modules/zod/v4/core/util.cjs (Line 381:1 - Line 393:9), frontend/node_modules/zod/v4/core/util.js (Line 336:2 - Line 348:7)
function merge(a, b) {
return clone(a, {
...a._zod.def,
get shape() {
const _shape = { ...a._zod.def.shape, ...b._zod.def.shape };
assignProp(this, "shape", _shape); // self-caching
return _shape;
},
catchall: b._zod.def.catchall,
checks: [], // delete existing checks
});
}
function
frontend/node_modules/zod/v4/core/util.cjs (Line 393:1 - Line 429:9), frontend/node_modules/zod/v4/core/util.js (Line 348:2 - Line 384:7)
function partial(Class, schema, mask) {
const oldShape = schema._zod.def.shape;
const shape = { ...oldShape };
if (mask) {
for (const key in mask) {
if (!(key in oldShape)) {
throw new Error(`Unrecognized key: "${key}"`);
}
if (!mask[key])
continue;
// if (oldShape[key]!._zod.optin === "optional") continue;
shape[key] = Class
? new Class({
type: "optional",
innerType: oldShape[key],
})
: oldShape[key];
}
}
else {
for (const key in oldShape) {
// if (oldShape[key]!._zod.optin === "optional") continue;
shape[key] = Class
? new Class({
type: "optional",
innerType: oldShape[key],
})
: oldShape[key];
}
}
return clone(schema, {
...schema._zod.def,
shape,
checks: [],
});
}
function
frontend/node_modules/zod/v4/core/util.cjs (Line 429:1 - Line 462:9), frontend/node_modules/zod/v4/core/util.js (Line 384:2 - Line 417:7)
function required(Class, schema, mask) {
const oldShape = schema._zod.def.shape;
const shape = { ...oldShape };
if (mask) {
for (const key in mask) {
if (!(key in shape)) {
throw new Error(`Unrecognized key: "${key}"`);
}
if (!mask[key])
continue;
// overwrite with non-optional
shape[key] = new Class({
type: "nonoptional",
innerType: oldShape[key],
});
}
}
else {
for (const key in oldShape) {
// overwrite with non-optional
shape[key] = new Class({
type: "nonoptional",
innerType: oldShape[key],
});
}
}
return clone(schema, {
...schema._zod.def,
shape,
// optional: [],
checks: [],
});
}
function
frontend/node_modules/zod/v4/core/util.cjs (Line 462:1 - Line 469:9), frontend/node_modules/zod/v4/core/util.js (Line 417:2 - Line 424:7)
function aborted(x, startIndex = 0) {
for (let i = startIndex; i < x.issues.length; i++) {
if (x.issues[i]?.continue !== true)
return true;
}
return false;
}
function
frontend/node_modules/zod/v4/core/util.cjs (Line 469:1 - Line 477:9), frontend/node_modules/zod/v4/core/util.js (Line 424:2 - Line 432:7)
function prefixIssues(path, issues) {
return issues.map((iss) => {
var _a;
(_a = iss).path ?? (_a.path = []);
iss.path.unshift(path);
return iss;
});
}
function
frontend/node_modules/zod/v4/core/util.cjs (Line 480:1 - Line 499:9), frontend/node_modules/zod/v4/core/util.js (Line 435:2 - Line 454:7)
function finalizeIssue(iss, ctx, config) {
const full = { ...iss, path: iss.path ?? [] };
// for backwards compatibility
if (!iss.message) {
const message = unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ??
unwrapMessage(ctx?.error?.(iss)) ??
unwrapMessage(config.customError?.(iss)) ??
unwrapMessage(config.localeError?.(iss)) ??
"Invalid input";
full.message = message;
}
// delete (full as any).def;
delete full.inst;
delete full.continue;
if (!ctx?.reportInput) {
delete full.input;
}
return full;
}
function
frontend/node_modules/zod/v4/core/util.cjs (Line 515:1 - Line 527:9), frontend/node_modules/zod/v4/core/util.js (Line 470:2 - Line 482:7)
function issue(...args) {
const [iss, input, inst] = args;
if (typeof iss === "string") {
return {
message: iss,
code: "custom",
input,
inst,
};
}
return { ...iss };
}
function
frontend/node_modules/zod/v4/core/util.cjs (Line 527:1 - Line 536:6), frontend/node_modules/zod/v4/core/util.js (Line 482:2 - Line 491:7)
function cleanEnum(obj) {
return Object.entries(obj)
.filter(([k, _]) => {
// return true if NaN, meaning it's not a number, thus a string key
return Number.isNaN(Number.parseInt(k, 10));
})
.map((el) => el[1]);
}
// instanceof
class
frontend/node_modules/zod/v4/core/to-json-schema.cjs (Line 10:2 - Line 318:2), frontend/node_modules/zod/v4/core/to-json-schema.js (Line 6:2 - Line 314:14)
globalRegistry;
this.target = params?.target ?? "draft-2020-12";
this.unrepresentable = params?.unrepresentable ?? "throw";
this.override = params?.override ?? (() => { });
this.io = params?.io ?? "output";
this.seen = new Map();
}
process(schema, _params = { path: [], schemaPath: [] }) {
var _a;
const def = schema._zod.def;
const formatMap = {
guid: "uuid",
url: "uri",
datetime: "date-time",
json_string: "json-string",
regex: "", // do not set
};
// check for schema in seens
const seen = this.seen.get(schema);
if (seen) {
seen.count++;
// check if cycle
const isCycle = _params.schemaPath.includes(schema);
if (isCycle) {
seen.cycle = _params.path;
}
return seen.schema;
}
// initialize
const result = { schema: {}, count: 1, cycle: undefined, path: _params.path };
this.seen.set(schema, result);
// custom method overrides default behavior
const overrideSchema = schema._zod.toJSONSchema?.();
if (overrideSchema) {
result.schema = overrideSchema;
}
else {
const params = {
..._params,
schemaPath: [..._params.schemaPath, schema],
path: _params.path,
};
const parent = schema._zod.parent;
if (parent) {
// schema was cloned from another schema
result.ref = parent;
this.process(parent, params);
this.seen.get(parent).isParent = true;
}
else {
const _json = result.schema;
switch (def.type) {
case "string": {
const json = _json;
json.type = "string";
const { minimum, maximum, format, patterns, contentEncoding } = schema._zod
.bag;
if (typeof minimum === "number")
json.minLength = minimum;
if (typeof maximum === "number")
json.maxLength = maximum;
// custom pattern overrides format
if (format) {
json.format = formatMap[format] ?? format;
if (json.format === "")
delete json.format; // empty format is not valid
}
if (contentEncoding)
json.contentEncoding = contentEncoding;
if (patterns && patterns.size > 0) {
const regexes = [...patterns];
if (regexes.length === 1)
json.pattern = regexes[0].source;
else if (regexes.length > 1) {
result.schema.allOf = [
...regexes.map((regex) => ({
...(this.target === "draft-7" ? { type: "string" } : {}),
pattern: regex.source,
})),
];
}
}
break;
}
case "number": {
const json = _json;
const { minimum, maximum, format, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag;
if (typeof format === "string" && format.includes("int"))
json.type = "integer";
else
json.type = "number";
if (typeof exclusiveMinimum === "number")
json.exclusiveMinimum = exclusiveMinimum;
if (typeof minimum === "number") {
json.minimum = minimum;
if (typeof exclusiveMinimum === "number") {
if (exclusiveMinimum >= minimum)
delete json.minimum;
else
delete json.exclusiveMinimum;
}
}
if (typeof exclusiveMaximum === "number")
json.exclusiveMaximum = exclusiveMaximum;
if (typeof maximum === "number") {
json.maximum = maximum;
if (typeof exclusiveMaximum === "number") {
if (exclusiveMaximum <= maximum)
delete json.maximum;
else
delete json.exclusiveMaximum;
}
}
if (typeof multipleOf === "number")
json.multipleOf = multipleOf;
break;
}
case "boolean": {
const json = _json;
json.type = "boolean";
break;
}
case "bigint": {
if (this.unrepresentable === "throw") {
throw new Error("BigInt cannot be represented in JSON Schema");
}
break;
}
case "symbol": {
if (this.unrepresentable === "throw") {
throw new Error("Symbols cannot be represented in JSON Schema");
}
break;
}
case "null": {
_json.type = "null";
break;
}
case "any": {
break;
}
case "unknown": {
break;
}
case "undefined": {
if (this.unrepresentable === "throw") {
throw new Error("Undefined cannot be represented in JSON Schema");
}
break;
}
case "void": {
if (this.unrepresentable === "throw") {
throw new Error("Void cannot be represented in JSON Schema");
}
break;
}
case "never": {
_json.not = {};
break;
}
case "date": {
if (this.unrepresentable === "throw") {
throw new Error("Date cannot be represented in JSON Schema");
}
break;
}
case "array": {
const json = _json;
const { minimum, maximum } = schema._zod.bag;
if (typeof minimum === "number")
json.minItems = minimum;
if (typeof maximum === "number")
json.maxItems = maximum;
json.type = "array";
json.items = this.process(def.element, { ...params, path: [...params.path, "items"] });
break;
}
case "object": {
const json = _json;
json.type = "object";
json.properties = {};
const shape = def.shape; // params.shapeCache.get(schema)!;
for (const key in shape) {
json.properties[key] = this.process(shape[key], {
...params,
path: [...params.path, "properties", key],
});
}
// required keys
const allKeys = new Set(Object.keys(shape));
// const optionalKeys = new Set(def.optional);
const requiredKeys = new Set([...allKeys].filter((key) => {
const v = def.shape[key]._zod;
if (this.io === "input") {
return v.optin === undefined;
}
else {
return v.optout === undefined;
}
}));
if (requiredKeys.size > 0) {
json.required = Array.from(requiredKeys);
}
// catchall
if (def.catchall?._zod.def.type === "never") {
// strict
json.additionalProperties = false;
}
else if (!def.catchall) {
// regular
if (this.io === "output")
json.additionalProperties = false;
}
else if (def.catchall) {
json.additionalProperties = this.process(def.catchall, {
...params,
path: [...params.path, "additionalProperties"],
});
}
break;
}
case "union": {
const json = _json;
json.anyOf = def.options.map((x, i) => this.process(x, {
...params,
path: [...params.path, "anyOf", i],
}));
break;
}
case "intersection": {
const json = _json;
const a = this.process(def.left, {
...params,
path: [...params.path, "allOf", 0],
});
const b = this.process(def.right, {
...params,
path: [...params.path, "allOf", 1],
});
const isSimpleIntersection = (val) => "allOf" in val && Object.keys(val).length === 1;
const allOf = [
...(isSimpleIntersection(a) ? a.allOf : [a]),
...(isSimpleIntersection(b) ? b.allOf : [b]),
];
json.allOf = allOf;
break;
}
case "tuple": {
const json = _json;
json.type = "array";
const prefixItems = def.items.map((x, i) => this.process(x, { ...params, path: [...params.path, "prefixItems", i] }));
if (this.target === "draft-2020-12") {
json.prefixItems = prefixItems;
}
else {
json.items = prefixItems;
}
if (def.rest) {
const rest = this.process(def.rest, {
...params,
path: [...params.path, "items"],
});
if (this.target === "draft-2020-12") {
json.items = rest;
}
else {
json.additionalItems = rest;
}
}
// additionalItems
if (def.rest) {
json.items = this.process(def.rest, {
...params,
path: [...params.path, "items"],
});
}
// length
const { minimum, maximum } = schema._zod.bag;
if (typeof minimum === "number")
json.minItems = minimum;
if (typeof maximum === "number")
json.maxItems = maximum;
break;
}
case "record": {
const json = _json;
json.type = "object";
json.propertyNames = this.process(def.keyType, { ...params, path: [...params.path, "propertyNames"] });
json.additionalProperties = this.process(def.valueType, {
...params,
path: [...params.path, "additionalProperties"],
});
break;
}
case "map": {
if (this.unrepresentable === "throw") {
throw new Error("Map cannot be represented in JSON Schema");
}
break;
}
case "set": {
if (this.unrepresentable === "throw") {
throw new Error("Set cannot be represented in JSON Schema");
}
break;
}
case "enum": {
const json = _json;
const values = (
frontend/node_modules/zod/v4/core/to-json-schema.cjs (Line 318:2 - Line 722:8), frontend/node_modules/zod/v4/core/to-json-schema.js (Line 314:14 - Line 718:7)
(def.entries);
// Number enums can have both string and number values
if (values.every((v) => typeof v === "number"))
json.type = "number";
if (values.every((v) => typeof v === "string"))
json.type = "string";
json.enum = values;
break;
}
case "literal": {
const json = _json;
const vals = [];
for (const val of def.values) {
if (val === undefined) {
if (this.unrepresentable === "throw") {
throw new Error("Literal `undefined` cannot be represented in JSON Schema");
}
else {
// do not add to vals
}
}
else if (typeof val === "bigint") {
if (this.unrepresentable === "throw") {
throw new Error("BigInt literals cannot be represented in JSON Schema");
}
else {
vals.push(Number(val));
}
}
else {
vals.push(val);
}
}
if (vals.length === 0) {
// do nothing (an undefined literal was stripped)
}
else if (vals.length === 1) {
const val = vals[0];
json.type = val === null ? "null" : typeof val;
json.const = val;
}
else {
if (vals.every((v) => typeof v === "number"))
json.type = "number";
if (vals.every((v) => typeof v === "string"))
json.type = "string";
if (vals.every((v) => typeof v === "boolean"))
json.type = "string";
if (vals.every((v) => v === null))
json.type = "null";
json.enum = vals;
}
break;
}
case "file": {
const json = _json;
const file = {
type: "string",
format: "binary",
contentEncoding: "binary",
};
const { minimum, maximum, mime } = schema._zod.bag;
if (minimum !== undefined)
file.minLength = minimum;
if (maximum !== undefined)
file.maxLength = maximum;
if (mime) {
if (mime.length === 1) {
file.contentMediaType = mime[0];
Object.assign(json, file);
}
else {
json.anyOf = mime.map((m) => {
const mFile = { ...file, contentMediaType: m };
return mFile;
});
}
}
else {
Object.assign(json, file);
}
// if (this.unrepresentable === "throw") {
// throw new Error("File cannot be represented in JSON Schema");
// }
break;
}
case "transform": {
if (this.unrepresentable === "throw") {
throw new Error("Transforms cannot be represented in JSON Schema");
}
break;
}
case "nullable": {
const inner = this.process(def.innerType, params);
_json.anyOf = [inner, { type: "null" }];
break;
}
case "nonoptional": {
this.process(def.innerType, params);
result.ref = def.innerType;
break;
}
case "success": {
const json = _json;
json.type = "boolean";
break;
}
case "default": {
this.process(def.innerType, params);
result.ref = def.innerType;
_json.default = JSON.parse(JSON.stringify(def.defaultValue));
break;
}
case "prefault": {
this.process(def.innerType, params);
result.ref = def.innerType;
if (this.io === "input")
_json._prefault = JSON.parse(JSON.stringify(def.defaultValue));
break;
}
case "catch": {
// use conditionals
this.process(def.innerType, params);
result.ref = def.innerType;
let catchValue;
try {
catchValue = def.catchValue(undefined);
}
catch {
throw new Error("Dynamic catch values are not supported in JSON Schema");
}
_json.default = catchValue;
break;
}
case "nan": {
if (this.unrepresentable === "throw") {
throw new Error("NaN cannot be represented in JSON Schema");
}
break;
}
case "template_literal": {
const json = _json;
const pattern = schema._zod.pattern;
if (!pattern)
throw new Error("Pattern not found in template literal");
json.type = "string";
json.pattern = pattern.source;
break;
}
case "pipe": {
const innerType = this.io === "input" ? (def.in._zod.def.type === "transform" ? def.out : def.in) : def.out;
this.process(innerType, params);
result.ref = innerType;
break;
}
case "readonly": {
this.process(def.innerType, params);
result.ref = def.innerType;
_json.readOnly = true;
break;
}
// passthrough types
case "promise": {
this.process(def.innerType, params);
result.ref = def.innerType;
break;
}
case "optional": {
this.process(def.innerType, params);
result.ref = def.innerType;
break;
}
case "lazy": {
const innerType = schema._zod.innerType;
this.process(innerType, params);
result.ref = innerType;
break;
}
case "custom": {
if (this.unrepresentable === "throw") {
throw new Error("Custom types cannot be represented in JSON Schema");
}
break;
}
default: {
def;
}
}
}
}
// metadata
const meta = this.metadataRegistry.get(schema);
if (meta)
Object.assign(result.schema, meta);
if (this.io === "input" && isTransforming(schema)) {
// examples/defaults only apply to output type of pipe
delete result.schema.examples;
delete result.schema.default;
}
// set prefault as default
if (this.io === "input" && result.schema._prefault)
(_a = result.schema).default ?? (_a.default = result.schema._prefault);
delete result.schema._prefault;
// pulling fresh from this.seen in case it was overwritten
const _result = this.seen.get(schema);
return _result.schema;
}
emit(schema, _params) {
const params = {
cycles: _params?.cycles ?? "ref",
reused: _params?.reused ?? "inline",
// unrepresentable: _params?.unrepresentable ?? "throw",
// uri: _params?.uri ?? ((id) => `${id}`),
external: _params?.external ?? undefined,
};
// iterate over seen map;
const root = this.seen.get(schema);
if (!root)
throw new Error("Unprocessed schema. This is a bug in Zod.");
// initialize result with root schema fields
// Object.assign(result, seen.cached);
// returns a ref to the schema
// defId will be empty if the ref points to an external schema (or #)
const makeURI = (entry) => {
// comparing the seen objects because sometimes
// multiple schemas map to the same seen object.
// e.g. lazy
// external is configured
const defsSegment = this.target === "draft-2020-12" ? "$defs" : "definitions";
if (params.external) {
const externalId = params.external.registry.get(entry[0])?.id; // ?? "__shared";// `__schema${this.counter++}`;
// check if schema is in the external registry
const uriGenerator = params.external.uri ?? ((id) => id);
if (externalId) {
return { ref: uriGenerator(externalId) };
}
// otherwise, add to __shared
const id = entry[1].defId ?? entry[1].schema.id ?? `schema${this.counter++}`;
entry[1].defId = id; // set defId so it will be reused if needed
return { defId: id, ref: `${uriGenerator("__shared")}#/${defsSegment}/${id}` };
}
if (entry[1] === root) {
return { ref: "#" };
}
// self-contained schema
const uriPrefix = `#`;
const defUriPrefix = `${uriPrefix}/${defsSegment}/`;
const defId = entry[1].schema.id ?? `__schema${this.counter++}`;
return { defId, ref: defUriPrefix + defId };
};
// stored cached version in `def` property
// remove all properties, set $ref
const extractToDef = (entry) => {
// if the schema is already a reference, do not extract it
if (entry[1].schema.$ref) {
return;
}
const seen = entry[1];
const { ref, defId } = makeURI(entry);
seen.def = { ...seen.schema };
// defId won't be set if the schema is a reference to an external schema
if (defId)
seen.defId = defId;
// wipe away all properties except $ref
const schema = seen.schema;
for (const key in schema) {
delete schema[key];
}
schema.$ref = ref;
};
// throw on cycles
// break cycles
if (params.cycles === "throw") {
for (const entry of this.seen.entries()) {
const seen = entry[1];
if (seen.cycle) {
throw new Error("Cycle detected: " +
`#/${seen.cycle?.join("/")}/<root>` +
'\n\nSet the `cycles` parameter to `"ref"` to resolve cyclical schemas with defs.');
}
}
}
// extract schemas into $defs
for (const entry of this.seen.entries()) {
const seen = entry[1];
// convert root schema to # $ref
if (schema === entry[0]) {
extractToDef(entry); // this has special handling for the root schema
continue;
}
// extract schemas that are in the external registry
if (params.external) {
const ext = params.external.registry.get(entry[0])?.id;
if (schema !== entry[0] && ext) {
extractToDef(entry);
continue;
}
}
// extract schemas with `id` meta
const id = this.metadataRegistry.get(entry[0])?.id;
if (id) {
extractToDef(entry);
continue;
}
// break cycles
if (seen.cycle) {
// any
extractToDef(entry);
continue;
}
// extract reused schemas
if (seen.count > 1) {
if (params.reused === "ref") {
extractToDef(entry);
// biome-ignore lint:
continue;
}
}
}
// flatten _refs
const flattenRef = (zodSchema, params) => {
const seen = this.seen.get(zodSchema);
const schema = seen.def ?? seen.schema;
const _cached = { ...schema };
// already seen
if (seen.ref === null) {
return;
}
// flatten ref if defined
const ref = seen.ref;
seen.ref = null; // prevent recursion
if (ref) {
flattenRef(ref, params);
// merge referenced schema into current
const refSchema = this.seen.get(ref).schema;
if (refSchema.$ref && params.target === "draft-7") {
schema.allOf = schema.allOf ?? [];
schema.allOf.push(refSchema);
}
else {
Object.assign(schema, refSchema);
Object.assign(schema, _cached); // prevent overwriting any fields in the original schema
}
}
// execute overrides
if (!seen.isParent)
this.override({
zodSchema: zodSchema,
jsonSchema: schema,
path: seen.path ?? [],
});
};
for (const entry of [...this.seen.entries()].reverse()) {
flattenRef(entry[0], { target: this.target });
}
const result = {};
if (this.target === "draft-2020-12") {
result.$schema = "https://json-schema.org/draft/2020-12/schema";
}
else if (this.target === "draft-7") {
result.$schema = "http://json-schema.org/draft-07/schema#";
}
else {
console.warn(`Invalid target: ${this.target}`);
}
if (params.external?.uri) {
const id = params.external.registry.get(schema)?.id;
if (!id)
throw new Error("Schema is missing an `id` property");
result.$id = params.external.uri(id);
}
Object.assign(result, root.def);
// build defs object
const defs = params.external?.defs ?? {};
for (const entry of this.seen.entries()) {
const seen = entry[1];
if (seen.def && seen.defId) {
defs[seen.defId] = seen.def;
}
}
// set definitions in result
if (params.external) {
}
else {
if (Object.keys(defs).length > 0) {
if (this.target === "draft-2020-12") {
result.$defs = defs;
}
else {
result.definitions = defs;
}
}
}
try {
// this "finalizes" this schema and ensures all cycles are removed
// each call to .emit() is functionally independent
// though the seen map is shared
return JSON.parse(JSON.stringify(result));
}
catch (_err) {
throw new Error("Error converting schema to JSON.");
}
}
}
exports
frontend/node_modules/zod/v4/core/to-json-schema.cjs (Line 724:2 - Line 854:2), frontend/node_modules/zod/v4/core/to-json-schema.js (Line 719:2 - Line 849:2)
$ZodRegistry) {
const gen = new JSONSchemaGenerator(_params);
const defs = {};
for (const entry of input._idmap.entries()) {
const [_, schema] = entry;
gen.process(schema);
}
const schemas = {};
const external = {
registry: input,
uri: _params?.uri,
defs,
};
for (const entry of input._idmap.entries()) {
const [key, schema] = entry;
schemas[key] = gen.emit(schema, {
..._params,
external,
});
}
if (Object.keys(defs).length > 0) {
const defsSegment = gen.target === "draft-2020-12" ? "$defs" : "definitions";
schemas.__shared = {
[defsSegment]: defs,
};
}
return { schemas };
}
const gen = new JSONSchemaGenerator(_params);
gen.process(input);
return gen.emit(input, _params);
}
function isTransforming(_schema, _ctx) {
const ctx = _ctx ?? { seen: new Set() };
if (ctx.seen.has(_schema))
return false;
ctx.seen.add(_schema);
const schema = _schema;
const def = schema._zod.def;
switch (def.type) {
case "string":
case "number":
case "bigint":
case "boolean":
case "date":
case "symbol":
case "undefined":
case "null":
case "any":
case "unknown":
case "never":
case "void":
case "literal":
case "enum":
case "nan":
case "file":
case "template_literal":
return false;
case "array": {
return isTransforming(def.element, ctx);
}
case "object": {
for (const key in def.shape) {
if (isTransforming(def.shape[key], ctx))
return true;
}
return false;
}
case "union": {
for (const option of def.options) {
if (isTransforming(option, ctx))
return true;
}
return false;
}
case "intersection": {
return isTransforming(def.left, ctx) || isTransforming(def.right, ctx);
}
case "tuple": {
for (const item of def.items) {
if (isTransforming(item, ctx))
return true;
}
if (def.rest && isTransforming(def.rest, ctx))
return true;
return false;
}
case "record": {
return isTransforming(def.keyType, ctx) || isTransforming(def.valueType, ctx);
}
case "map": {
return isTransforming(def.keyType, ctx) || isTransforming(def.valueType, ctx);
}
case "set": {
return isTransforming(def.valueType, ctx);
}
// inner types
case "promise":
case "optional":
case "nonoptional":
case "nullable":
case "readonly":
return isTransforming(def.innerType, ctx);
case "lazy":
return isTransforming(def.getter(), ctx);
case "default": {
return isTransforming(def.innerType, ctx);
}
case "prefault": {
return isTransforming(def.innerType, ctx);
}
case "custom": {
return false;
}
case "transform": {
return true;
}
case "pipe": {
return isTransforming(def.in, ctx) || isTransforming(def.out, ctx);
}
case "success": {
return false;
}
case "catch": {
return false;
}
default:
def;
}
throw new Error(`Unknown schema type: ${def.type}`);
}
frontend/node_modules/zod/v4/core/registries.cjs (Line 7:1 - Line 51:8), frontend/node_modules/zod/v4/core/registries.js (Line 3:2 - Line 47:14)
class $ZodRegistry {
constructor() {
this._map = new Map();
this._idmap = new Map();
}
add(schema, ..._meta) {
const meta = _meta[0];
this._map.set(schema, meta);
if (meta && typeof meta === "object" && "id" in meta) {
if (this._idmap.has(meta.id)) {
throw new Error(`ID ${meta.id} already exists in the registry`);
}
this._idmap.set(meta.id, schema);
}
return this;
}
clear() {
this._map = new Map();
this._idmap = new Map();
return this;
}
remove(schema) {
const meta = this._map.get(schema);
if (meta && typeof meta === "object" && "id" in meta) {
this._idmap.delete(meta.id);
}
this._map.delete(schema);
return this;
}
get(schema) {
// return this._map.get(schema) as any;
// inherit metadata
const p = schema._zod.parent;
if (p) {
const pm = { ...(this.get(p) ?? {}) };
delete pm.id; // do not inherit id
return { ...pm, ...this._map.get(schema) };
}
return this._map.get(schema);
}
has(schema) {
return this._map.has(schema);
}
}
exports
frontend/node_modules/zod/v4/core/regexes.cjs (Line 22:1 - Line 27:8), frontend/node_modules/zod/v4/core/regexes.js (Line 16:2 - Line 21:7)
const uuid = (version) => {
if (!version)
return /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/;
return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${version}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`);
};
exports
frontend/node_modules/zod/v4/core/regexes.cjs (Line 61:2 - Line 73:9), frontend/node_modules/zod/v4/core/regexes.js (Line 54:2 - Line 66:7)
frontend/node_modules/zod/v4/core/errors.cjs (Line 58:1 - Line 72:9), frontend/node_modules/zod/v4/core/errors.js (Line 27:2 - Line 41:7)
function flattenError(error, mapper = (issue) => issue.message) {
const fieldErrors = {};
const formErrors = [];
for (const sub of error.issues) {
if (sub.path.length > 0) {
fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];
fieldErrors[sub.path[0]].push(mapper(sub));
}
else {
formErrors.push(mapper(sub));
}
}
return { formErrors, fieldErrors };
}
function
frontend/node_modules/zod/v4/core/errors.cjs (Line 72:1 - Line 114:9), frontend/node_modules/zod/v4/core/errors.js (Line 41:2 - Line 83:7)
function formatError(error, _mapper) {
const mapper = _mapper ||
function (issue) {
return issue.message;
};
const fieldErrors = { _errors: [] };
const processError = (error) => {
for (const issue of error.issues) {
if (issue.code === "invalid_union" && issue.errors.length) {
issue.errors.map((issues) => processError({ issues }));
}
else if (issue.code === "invalid_key") {
processError({ issues: issue.issues });
}
else if (issue.code === "invalid_element") {
processError({ issues: issue.issues });
}
else if (issue.path.length === 0) {
fieldErrors._errors.push(mapper(issue));
}
else {
let curr = fieldErrors;
let i = 0;
while (i < issue.path.length) {
const el = issue.path[i];
const terminal = i === issue.path.length - 1;
if (!terminal) {
curr[el] = curr[el] || { _errors: [] };
}
else {
curr[el] = curr[el] || { _errors: [] };
curr[el]._errors.push(mapper(issue));
}
curr = curr[el];
i++;
}
}
}
};
processError(error);
return fieldErrors;
}
function
frontend/node_modules/zod/v4/core/errors.cjs (Line 114:1 - Line 197:9), frontend/node_modules/zod/v4/core/errors.js (Line 83:2 - Line 166:7)
function treeifyError(error, _mapper) {
const mapper = _mapper ||
function (issue) {
return issue.message;
};
const result = { errors: [] };
const processError = (error, path = []) => {
var _a, _b;
for (const issue of error.issues) {
if (issue.code === "invalid_union" && issue.errors.length) {
// regular union error
issue.errors.map((issues) => processError({ issues }, issue.path));
}
else if (issue.code === "invalid_key") {
processError({ issues: issue.issues }, issue.path);
}
else if (issue.code === "invalid_element") {
processError({ issues: issue.issues }, issue.path);
}
else {
const fullpath = [...path, ...issue.path];
if (fullpath.length === 0) {
result.errors.push(mapper(issue));
continue;
}
let curr = result;
let i = 0;
while (i < fullpath.length) {
const el = fullpath[i];
const terminal = i === fullpath.length - 1;
if (typeof el === "string") {
curr.properties ?? (curr.properties = {});
(_a = curr.properties)[el] ?? (_a[el] = { errors: [] });
curr = curr.properties[el];
}
else {
curr.items ?? (curr.items = []);
(_b = curr.items)[el] ?? (_b[el] = { errors: [] });
curr = curr.items[el];
}
if (terminal) {
curr.errors.push(mapper(issue));
}
i++;
}
}
}
};
processError(error);
return result;
}
/** Format a ZodError as a human-readable string in the following form.
*
* From
*
* ```ts
* ZodError {
* issues: [
* {
* expected: 'string',
* code: 'invalid_type',
* path: [ 'username' ],
* message: 'Invalid input: expected string'
* },
* {
* expected: 'number',
* code: 'invalid_type',
* path: [ 'favoriteNumbers', 1 ],
* message: 'Invalid input: expected number'
* }
* ];
* }
* ```
*
* to
*
* ```
* username
* ✖ Expected number, received string at "username
* favoriteNumbers[0]
* ✖ Invalid input: expected number
* ```
*/
function
frontend/node_modules/zod/v4/core/errors.cjs (Line 197:1 - Line 214:9), frontend/node_modules/zod/v4/core/errors.js (Line 166:2 - Line 183:7)
function toDotPath(path) {
const segs = [];
for (const seg of path) {
if (typeof seg === "number")
segs.push(`[${seg}]`);
else if (typeof seg === "symbol")
segs.push(`[${JSON.stringify(String(seg))}]`);
else if (/[^\w$]/.test(seg))
segs.push(`[${JSON.stringify(seg)}]`);
else {
if (segs.length)
segs.push(".");
segs.push(seg);
}
}
return segs.join("");
}
function
frontend/node_modules/zod/v4/core/errors.cjs (Line 214:1 - Line 226:2), frontend/node_modules/zod/v4/core/errors.js (Line 183:2 - Line 195:2)
function prettifyError(error) {
const lines = [];
// sort by path length
const issues = [...error.issues].sort((a, b) => a.path.length - b.path.length);
// Process each issue
for (const issue of issues) {
lines.push(`✖ ${issue.message}`);
if (issue.path?.length)
lines.push(` → at ${toDotPath(issue.path)}`);
}
// Convert Map to formatted string
return lines.join("\n");
}
frontend/node_modules/zod/v4/core/doc.cjs (Line 4:1 - Line 38:2), frontend/node_modules/zod/v4/core/doc.js (Line 1:2 - Line 35:2)
frontend/node_modules/zod/v3/locales/en.cjs (Line 40:2 - Line 55:10), frontend/node_modules/zod/v3/locales/en.js (Line 38:2 - Line 53:5)
ZodIssueCode.invalid_string:
if (typeof issue.validation === "object") {
if ("includes" in issue.validation) {
message = `Invalid input: must include "${issue.validation.includes}"`;
if (typeof issue.validation.position === "number") {
message = `${message} at one or more positions greater than or equal to ${issue.validation.position}`;
}
}
else if ("startsWith" in issue.validation) {
message = `Invalid input: must start with "${issue.validation.startsWith}"`;
}
else if ("endsWith" in issue.validation) {
message = `Invalid input: must end with "${issue.validation.endsWith}"`;
}
else {
util_js_1
frontend/node_modules/zod/v3/locales/en.cjs (Line 65:2 - Line 79:14), frontend/node_modules/zod/v3/locales/en.js (Line 63:2 - Line 77:13)
ZodIssueCode.too_small:
if (issue.type === "array")
message = `Array must contain ${issue.exact ? "exactly" : issue.inclusive ? `at least` : `more than`} ${issue.minimum} element(s)`;
else if (issue.type === "string")
message = `String must contain ${issue.exact ? "exactly" : issue.inclusive ? `at least` : `over`} ${issue.minimum} character(s)`;
else if (issue.type === "number")
message = `Number must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${issue.minimum}`;
else if (issue.type === "bigint")
message = `Number must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${issue.minimum}`;
else if (issue.type === "date")
message = `Date must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${new Date(Number(issue.minimum))}`;
else
message = "Invalid input";
break;
case ZodError_js_1
frontend/node_modules/zod/v3/locales/en.cjs (Line 79:2 - Line 93:14), frontend/node_modules/zod/v3/locales/en.js (Line 77:2 - Line 91:13)
ZodIssueCode.too_big:
if (issue.type === "array")
message = `Array must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `less than`} ${issue.maximum} element(s)`;
else if (issue.type === "string")
message = `String must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `under`} ${issue.maximum} character(s)`;
else if (issue.type === "number")
message = `Number must be ${issue.exact ? `exactly` : issue.inclusive ? `less than or equal to` : `less than`} ${issue.maximum}`;
else if (issue.type === "bigint")
message = `BigInt must be ${issue.exact ? `exactly` : issue.inclusive ? `less than or equal to` : `less than`} ${issue.maximum}`;
else if (issue.type === "date")
message = `Date must be ${issue.exact ? `exactly` : issue.inclusive ? `smaller than or equal to` : `smaller than`} ${new Date(Number(issue.maximum))}`;
else
message = "Invalid input";
break;
case ZodError_js_1
frontend/node_modules/zod/v3/helpers/util.cjs (Line 4:1 - Line 64:8), frontend/node_modules/zod/v3/helpers/util.js (Line 1:2 - Line 61:5)
frontend/node_modules/yaml/dist/stringify/stringifyNumber.js (Line 3:1 - Line 26:8), frontend/node_modules/yaml/browser/dist/stringify/stringifyNumber.js (Line 1:1 - Line 24:7)
function stringifyNumber({ format, minFractionDigits, tag, value }) {
if (typeof value === 'bigint')
return String(value);
const num = typeof value === 'number' ? value : Number(value);
if (!isFinite(num))
return isNaN(num) ? '.nan' : num < 0 ? '-.inf' : '.inf';
let n = JSON.stringify(value);
if (!format &&
minFractionDigits &&
(!tag || tag === 'tag:yaml.org,2002:float') &&
/^\d/.test(n)) {
let i = n.indexOf('.');
if (i < 0) {
i = n.length;
n += '.';
}
let d = minFractionDigits - (n.length - i - 1);
while (d-- > 0)
n += '0';
}
return n;
}
exports
frontend/node_modules/yaml/dist/stringify/stringifyDocument.js (Line 5:2 - Line 21:10), frontend/node_modules/yaml/browser/dist/stringify/stringifyDocument.js (Line 3:24 - Line 19:23)
;
function stringifyDocument(doc, options) {
const lines = [];
let hasDirectives = options.directives === true;
if (options.directives !== false && doc.directives) {
const dir = doc.directives.toString(doc);
if (dir) {
lines.push(dir);
hasDirectives = true;
}
else if (doc.directives.docStart)
hasDirectives = true;
}
if (hasDirectives)
lines.push('---');
const ctx = stringify
frontend/node_modules/yaml/dist/stringify/stringifyDocument.js (Line 21:2 - Line 27:17), frontend/node_modules/yaml/browser/dist/stringify/stringifyDocument.js (Line 19:2 - Line 25:14)
frontend/node_modules/yaml/dist/stringify/stringifyDocument.js (Line 32:2 - Line 37:17), frontend/node_modules/yaml/browser/dist/stringify/stringifyDocument.js (Line 30:2 - Line 35:14)
isNode(doc.contents)) {
if (doc.contents.spaceBefore && hasDirectives)
lines.push('');
if (doc.contents.commentBefore) {
const cs = commentString(doc.contents.commentBefore);
lines.push(stringifyComment
frontend/node_modules/yaml/dist/stringify/stringifyDocument.js (Line 46:2 - Line 57:10), frontend/node_modules/yaml/browser/dist/stringify/stringifyDocument.js (Line 44:2 - Line 55:10)
lineComment(body, '', commentString(contentComment));
if ((body[0] === '|' || body[0] === '>') &&
lines[lines.length - 1] === '---') {
// Top-level block scalars with a preceding doc marker ought to use the
// same line for their header.
lines[lines.length - 1] = `--- ${body}`;
}
else
lines.push(body);
}
else {
lines.push(stringify
frontend/node_modules/yaml/dist/stringify/stringifyDocument.js (Line 57:2 - Line 64:17), frontend/node_modules/yaml/browser/dist/stringify/stringifyDocument.js (Line 55:2 - Line 62:14)
stringify(doc.contents, ctx));
}
if (doc.directives?.docEnd) {
if (doc.comment) {
const cs = commentString(doc.comment);
if (cs.includes('\n')) {
lines.push('...');
lines.push(stringifyComment
frontend/node_modules/yaml/dist/stringify/stringifyDocument.js (Line 64:2 - Line 81:17), frontend/node_modules/yaml/browser/dist/stringify/stringifyDocument.js (Line 62:2 - Line 79:14)
indentComment(cs, ''));
}
else {
lines.push(`... ${cs}`);
}
}
else {
lines.push('...');
}
}
else {
let dc = doc.comment;
if (dc && chompKeep)
dc = dc.replace(/^\n+/, '');
if (dc) {
if ((!chompKeep || contentComment) && lines[lines.length - 1] !== '')
lines.push('');
lines.push(stringifyComment
frontend/node_modules/yaml/dist/stringify/stringifyComment.js (Line 3:1 - Line 22:8), frontend/node_modules/yaml/browser/dist/stringify/stringifyComment.js (Line 1:1 - Line 20:7)
/**
* Stringifies a comment.
*
* Empty comment lines are left empty,
* lines consisting of a single space are replaced by `#`,
* and all other lines are prefixed with a `#`.
*/
const stringifyComment = (str) => str.replace(/^(?!$)(?: $)?/gm, '#');
function indentComment(comment, indent) {
if (/^\n+$/.test(comment))
return comment.substring(1);
return indent ? comment.replace(/^(?! *$)/gm, indent) : comment;
}
const lineComment = (str, indent, comment) => str.endsWith('\n')
? indentComment(comment, indent)
: comment.includes('\n')
? '\n' + indentComment(comment, indent)
: (str.endsWith(' ') ? '' : ' ') + comment;
exports
frontend/node_modules/yaml/dist/stringify/stringifyCollection.js (Line 5:2 - Line 20:9), frontend/node_modules/yaml/browser/dist/stringify/stringifyCollection.js (Line 3:24 - Line 18:7)
;
function stringifyCollection(collection, ctx, options) {
const flow = ctx.inFlow ?? collection.flow;
const stringify = flow ? stringifyFlowCollection : stringifyBlockCollection;
return stringify(collection, ctx, options);
}
function stringifyBlockCollection({ comment, items }, ctx, { blockItemPrefix, flowChars, itemIndent, onChompKeep, onComment }) {
const { indent, options: { commentString } } = ctx;
const itemCtx = Object.assign({}, ctx, { indent: itemIndent, type: null });
let chompKeep = false; // flag for the preceding node's status
const lines = [];
for (let i = 0; i < items.length; ++i) {
const item = items[i];
let comment = null;
if (identity
frontend/node_modules/yaml/dist/stringify/stringifyCollection.js (Line 20:2 - Line 27:9), frontend/node_modules/yaml/browser/dist/stringify/stringifyCollection.js (Line 18:2 - Line 25:7)
isNode(item)) {
if (!chompKeep && item.spaceBefore)
lines.push('');
addCommentBefore(ctx, lines, item.commentBefore, chompKeep);
if (item.comment)
comment = item.comment;
}
else if (identity
frontend/node_modules/yaml/dist/stringify/stringifyCollection.js (Line 28:2 - Line 36:10), frontend/node_modules/yaml/browser/dist/stringify/stringifyCollection.js (Line 26:2 - Line 34:10)
isNode(item.key) ? item.key : null;
if (ik) {
if (!chompKeep && ik.spaceBefore)
lines.push('');
addCommentBefore(ctx, lines, ik.commentBefore, chompKeep);
}
}
chompKeep = false;
let str = stringify
frontend/node_modules/yaml/dist/stringify/stringifyCollection.js (Line 38:2 - Line 55:17), frontend/node_modules/yaml/browser/dist/stringify/stringifyCollection.js (Line 36:2 - Line 53:14)
lineComment(str, itemIndent, commentString(comment));
if (chompKeep && comment)
chompKeep = false;
lines.push(blockItemPrefix + str);
}
let str;
if (lines.length === 0) {
str = flowChars.start + flowChars.end;
}
else {
str = lines[0];
for (let i = 1; i < lines.length; ++i) {
const line = lines[i];
str += line ? `\n${indent}${line}` : '\n';
}
}
if (comment) {
str += '\n' + stringifyComment
frontend/node_modules/yaml/dist/stringify/stringifyCollection.js (Line 55:2 - Line 77:9), frontend/node_modules/yaml/browser/dist/stringify/stringifyCollection.js (Line 53:2 - Line 75:7)
indentComment(commentString(comment), indent);
if (onComment)
onComment();
}
else if (chompKeep && onChompKeep)
onChompKeep();
return str;
}
function stringifyFlowCollection({ items }, ctx, { flowChars, itemIndent }) {
const { indent, indentStep, flowCollectionPadding: fcPadding, options: { commentString } } = ctx;
itemIndent += indentStep;
const itemCtx = Object.assign({}, ctx, {
indent: itemIndent,
inFlow: true,
type: null
});
let reqNewline = false;
let linesAtValue = 0;
const lines = [];
for (let i = 0; i < items.length; ++i) {
const item = items[i];
let comment = null;
if (identity
frontend/node_modules/yaml/dist/stringify/stringifyCollection.js (Line 80:6 - Line 87:3), frontend/node_modules/yaml/dist/stringify/stringifyCollection.js (Line 23:10 - Line 30:2)
);
if (item.comment)
comment = item.comment;
}
else if (identity.isPair(item)) {
const ik = identity.isNode(item.key) ? item.key : null;
if (ik) {
if (ik
frontend/node_modules/yaml/dist/stringify/stringifyCollection.js (Line 85:2 - Line 93:9), frontend/node_modules/yaml/browser/dist/stringify/stringifyCollection.js (Line 83:2 - Line 91:7)
isNode(item.key) ? item.key : null;
if (ik) {
if (ik.spaceBefore)
lines.push('');
addCommentBefore(ctx, lines, ik.commentBefore, false);
if (ik.comment)
reqNewline = true;
}
const iv = identity
frontend/node_modules/yaml/dist/stringify/stringifyCollection.js (Line 93:2 - Line 106:10), frontend/node_modules/yaml/browser/dist/stringify/stringifyCollection.js (Line 91:2 - Line 104:10)
isNode(item.value) ? item.value : null;
if (iv) {
if (iv.comment)
comment = iv.comment;
if (iv.commentBefore)
reqNewline = true;
}
else if (item.value == null && ik?.comment) {
comment = ik.comment;
}
}
if (comment)
reqNewline = true;
let str = stringify
frontend/node_modules/yaml/dist/stringify/stringifyCollection.js (Line 110:2 - Line 140:17), frontend/node_modules/yaml/browser/dist/stringify/stringifyCollection.js (Line 108:2 - Line 138:14)
lineComment(str, itemIndent, commentString(comment));
if (!reqNewline && (lines.length > linesAtValue || str.includes('\n')))
reqNewline = true;
lines.push(str);
linesAtValue = lines.length;
}
const { start, end } = flowChars;
if (lines.length === 0) {
return start + end;
}
else {
if (!reqNewline) {
const len = lines.reduce((sum, line) => sum + line.length + 2, 2);
reqNewline = ctx.options.lineWidth > 0 && len > ctx.options.lineWidth;
}
if (reqNewline) {
let str = start;
for (const line of lines)
str += line ? `\n${indentStep}${indent}${line}` : '\n';
return `${str}\n${indent}${end}`;
}
else {
return `${start}${fcPadding}${lines.join(' ')}${fcPadding}${end}`;
}
}
}
function addCommentBefore({ indent, options: { commentString } }, lines, comment, chompKeep) {
if (comment && chompKeep)
comment = comment.replace(/^\n+/, '');
if (comment) {
const ic = stringifyComment
frontend/node_modules/yaml/dist/stringify/stringify.js (Line 11:2 - Line 57:9), frontend/node_modules/yaml/browser/dist/stringify/stringify.js (Line 9:2 - Line 55:9)
frontend/node_modules/yaml/dist/stringify/foldFlowLines.js (Line 3:1 - Line 148:8), frontend/node_modules/yaml/browser/dist/stringify/foldFlowLines.js (Line 1:1 - Line 146:7)
const FOLD_FLOW = 'flow';
const FOLD_BLOCK = 'block';
const FOLD_QUOTED = 'quoted';
/**
* Tries to keep input at up to `lineWidth` characters, splitting only on spaces
* not followed by newlines or spaces unless `mode` is `'quoted'`. Lines are
* terminated with `\n` and started with `indent`.
*/
function foldFlowLines(text, indent, mode = 'flow', { indentAtStart, lineWidth = 80, minContentWidth = 20, onFold, onOverflow } = {}) {
if (!lineWidth || lineWidth < 0)
return text;
if (lineWidth < minContentWidth)
minContentWidth = 0;
const endStep = Math.max(1 + minContentWidth, 1 + lineWidth - indent.length);
if (text.length <= endStep)
return text;
const folds = [];
const escapedFolds = {};
let end = lineWidth - indent.length;
if (typeof indentAtStart === 'number') {
if (indentAtStart > lineWidth - Math.max(2, minContentWidth))
folds.push(0);
else
end = lineWidth - indentAtStart;
}
let split = undefined;
let prev = undefined;
let overflow = false;
let i = -1;
let escStart = -1;
let escEnd = -1;
if (mode === FOLD_BLOCK) {
i = consumeMoreIndentedLines(text, i, indent.length);
if (i !== -1)
end = i + endStep;
}
for (let ch; (ch = text[(i += 1)]);) {
if (mode === FOLD_QUOTED && ch === '\\') {
escStart = i;
switch (text[i + 1]) {
case 'x':
i += 3;
break;
case 'u':
i += 5;
break;
case 'U':
i += 9;
break;
default:
i += 1;
}
escEnd = i;
}
if (ch === '\n') {
if (mode === FOLD_BLOCK)
i = consumeMoreIndentedLines(text, i, indent.length);
end = i + indent.length + endStep;
split = undefined;
}
else {
if (ch === ' ' &&
prev &&
prev !== ' ' &&
prev !== '\n' &&
prev !== '\t') {
// space surrounded by non-space can be replaced with newline + indent
const next = text[i + 1];
if (next && next !== ' ' && next !== '\n' && next !== '\t')
split = i;
}
if (i >= end) {
if (split) {
folds.push(split);
end = split + endStep;
split = undefined;
}
else if (mode === FOLD_QUOTED) {
// white-space collected at end may stretch past lineWidth
while (prev === ' ' || prev === '\t') {
prev = ch;
ch = text[(i += 1)];
overflow = true;
}
// Account for newline escape, but don't break preceding escape
const j = i > escEnd + 1 ? i - 2 : escStart - 1;
// Bail out if lineWidth & minContentWidth are shorter than an escape string
if (escapedFolds[j])
return text;
folds.push(j);
escapedFolds[j] = true;
end = j + endStep;
split = undefined;
}
else {
overflow = true;
}
}
}
prev = ch;
}
if (overflow && onOverflow)
onOverflow();
if (folds.length === 0)
return text;
if (onFold)
onFold();
let res = text.slice(0, folds[0]);
for (let i = 0; i < folds.length; ++i) {
const fold = folds[i];
const end = folds[i + 1] || text.length;
if (fold === 0)
res = `\n${indent}${text.slice(0, end)}`;
else {
if (mode === FOLD_QUOTED && escapedFolds[fold])
res += `${text[fold]}\\`;
res += `\n${indent}${text.slice(fold + 1, end)}`;
}
}
return res;
}
/**
* Presumes `i + 1` is at the start of a line
* @returns index of last newline in more-indented block
*/
function consumeMoreIndentedLines(text, i, indent) {
let end = i;
let start = i + 1;
let ch = text[start];
while (ch === ' ' || ch === '\t') {
if (i < start + indent) {
ch = text[++i];
}
else {
do {
ch = text[++i];
} while (ch && ch !== '\n');
end = i;
start = i + 1;
ch = text[start];
}
}
return end;
}
exports
frontend/node_modules/yaml/dist/schema/tags.js (Line 59:2 - Line 82:2), frontend/node_modules/yaml/browser/dist/schema/tags.js (Line 57:2 - Line 80:2)
merge)
: schemaTags.slice();
}
let tags = schemaTags;
if (!tags) {
if (Array.isArray(customTags))
tags = [];
else {
const keys = Array.from(schemas.keys())
.filter(key => key !== 'yaml11')
.map(key => JSON.stringify(key))
.join(', ');
throw new Error(`Unknown schema "${schemaName}"; use one of ${keys} or define customTags array`);
}
}
if (Array.isArray(customTags)) {
for (const tag of customTags)
tags = tags.concat(tag);
}
else if (typeof customTags === 'function') {
tags = customTags(tags.slice());
}
if (addMergeTag)
tags = tags.concat(merge.
frontend/node_modules/yaml/dist/schema/tags.js (Line 82:2 - Line 98:8), frontend/node_modules/yaml/browser/dist/schema/tags.js (Line 80:2 - Line 96:7)
merge);
return tags.reduce((tags, tag) => {
const tagObj = typeof tag === 'string' ? tagsByName[tag] : tag;
if (!tagObj) {
const tagName = JSON.stringify(tag);
const keys = Object.keys(tagsByName)
.map(key => JSON.stringify(key))
.join(', ');
throw new Error(`Unknown custom tag ${tagName}; use one of ${keys}`);
}
if (!tags.includes(tagObj))
tags.push(tagObj);
return tags;
}, []);
}
exports
frontend/node_modules/yaml/dist/schema/Schema.js (Line 7:2 - Line 13:5), frontend/node_modules/yaml/browser/dist/schema/Schema.js (Line 5:12 - Line 11:8)
frontend/node_modules/yaml/dist/parse/parser.js (Line 5:2 - Line 146:6), frontend/node_modules/yaml/browser/dist/parse/parser.js (Line 2:13 - Line 143:6)
;
function includesToken(list, type) {
for (let i = 0; i < list.length; ++i)
if (list[i].type === type)
return true;
return false;
}
function findNonEmptyIndex(list) {
for (let i = 0; i < list.length; ++i) {
switch (list[i].type) {
case 'space':
case 'comment':
case 'newline':
break;
default:
return i;
}
}
return -1;
}
function isFlowToken(token) {
switch (token?.type) {
case 'alias':
case 'scalar':
case 'single-quoted-scalar':
case 'double-quoted-scalar':
case 'flow-collection':
return true;
default:
return false;
}
}
function getPrevProps(parent) {
switch (parent.type) {
case 'document':
return parent.start;
case 'block-map': {
const it = parent.items[parent.items.length - 1];
return it.sep ?? it.start;
}
case 'block-seq':
return parent.items[parent.items.length - 1].start;
/* istanbul ignore next should not happen */
default:
return [];
}
}
/** Note: May modify input array */
function getFirstKeyStartProps(prev) {
if (prev.length === 0)
return [];
let i = prev.length;
loop: while (--i >= 0) {
switch (prev[i].type) {
case 'doc-start':
case 'explicit-key-ind':
case 'map-value-ind':
case 'seq-item-ind':
case 'newline':
break loop;
}
}
while (prev[++i]?.type === 'space') {
/* loop */
}
return prev.splice(i, prev.length);
}
function fixFlowSeqItems(fc) {
if (fc.start.type === 'flow-seq-start') {
for (const it of fc.items) {
if (it.sep &&
!it.value &&
!includesToken(it.start, 'explicit-key-ind') &&
!includesToken(it.sep, 'map-value-ind')) {
if (it.key)
it.value = it.key;
delete it.key;
if (isFlowToken(it.value)) {
if (it.value.end)
Array.prototype.push.apply(it.value.end, it.sep);
else
it.value.end = it.sep;
}
else
Array.prototype.push.apply(it.start, it.sep);
delete it.sep;
}
}
}
}
/**
* A YAML concrete syntax tree (CST) parser
*
* ```ts
* const src: string = ...
* for (const token of new Parser().parse(src)) {
* // token: Token
* }
* ```
*
* To use the parser with a user-provided lexer:
*
* ```ts
* function* parse(source: string, lexer: Lexer) {
* const parser = new Parser()
* for (const lexeme of lexer.lex(source))
* yield* parser.next(lexeme)
* yield* parser.end()
* }
*
* const src: string = ...
* const lexer = new Lexer()
* for (const token of parse(src, lexer)) {
* // token: Token
* }
* ```
*/
class Parser {
/**
* @param onNewLine - If defined, called separately with the start position of
* each new line (in `parse()`, including the start of input).
*/
constructor(onNewLine) {
/** If true, space and sequence indicators count as indentation */
this.atNewLine = true;
/** If true, next token is a scalar value */
this.atScalar = false;
/** Current indentation level */
this.indent = 0;
/** Current offset since the start of parsing */
this.offset = 0;
/** On the same line with a block map key */
this.onKeyLine = false;
/** Top indicates the node that's currently being built */
this.stack = [];
/** The source of the current token, set in parse() */
this.source = '';
/** The type of the current token, set in parse() */
this.type = '';
// Must be defined after `next()`
this.lexer = new lexer
frontend/node_modules/yaml/dist/parse/parser.js (Line 146:2 - Line 170:13), frontend/node_modules/yaml/browser/dist/parse/parser.js (Line 143:2 - Line 167:5)
Lexer();
this.onNewLine = onNewLine;
}
/**
* Parse `source` as a YAML stream.
* If `incomplete`, a part of the last line may be left as a buffer for the next call.
*
* Errors are not thrown, but yielded as `{ type: 'error', message }` tokens.
*
* @returns A generator of tokens representing each directive, document, and other structure.
*/
*parse(source, incomplete = false) {
if (this.onNewLine && this.offset === 0)
this.onNewLine(0);
for (const lexeme of this.lexer.lex(source, incomplete))
yield* this.next(lexeme);
if (!incomplete)
yield* this.end();
}
/**
* Advance the parser by the `source` of one lexical token.
*/
*next(source) {
this.source = source;
if (node_process
frontend/node_modules/yaml/dist/parse/parser.js (Line 178:2 - Line 972:8), frontend/node_modules/yaml/browser/dist/parse/parser.js (Line 173:2 - Line 967:7)
tokenType(source);
if (!type) {
const message = `Not a YAML token: ${source}`;
yield* this.pop({ type: 'error', offset: this.offset, message, source });
this.offset += source.length;
}
else if (type === 'scalar') {
this.atNewLine = false;
this.atScalar = true;
this.type = 'scalar';
}
else {
this.type = type;
yield* this.step();
switch (type) {
case 'newline':
this.atNewLine = true;
this.indent = 0;
if (this.onNewLine)
this.onNewLine(this.offset + source.length);
break;
case 'space':
if (this.atNewLine && source[0] === ' ')
this.indent += source.length;
break;
case 'explicit-key-ind':
case 'map-value-ind':
case 'seq-item-ind':
if (this.atNewLine)
this.indent += source.length;
break;
case 'doc-mode':
case 'flow-error-end':
return;
default:
this.atNewLine = false;
}
this.offset += source.length;
}
}
/** Call at end of input to push out any remaining constructions */
*end() {
while (this.stack.length > 0)
yield* this.pop();
}
get sourceToken() {
const st = {
type: this.type,
offset: this.offset,
indent: this.indent,
source: this.source
};
return st;
}
*step() {
const top = this.peek(1);
if (this.type === 'doc-end' && (!top || top.type !== 'doc-end')) {
while (this.stack.length > 0)
yield* this.pop();
this.stack.push({
type: 'doc-end',
offset: this.offset,
source: this.source
});
return;
}
if (!top)
return yield* this.stream();
switch (top.type) {
case 'document':
return yield* this.document(top);
case 'alias':
case 'scalar':
case 'single-quoted-scalar':
case 'double-quoted-scalar':
return yield* this.scalar(top);
case 'block-scalar':
return yield* this.blockScalar(top);
case 'block-map':
return yield* this.blockMap(top);
case 'block-seq':
return yield* this.blockSequence(top);
case 'flow-collection':
return yield* this.flowCollection(top);
case 'doc-end':
return yield* this.documentEnd(top);
}
/* istanbul ignore next should not happen */
yield* this.pop();
}
peek(n) {
return this.stack[this.stack.length - n];
}
*pop(error) {
const token = error ?? this.stack.pop();
/* istanbul ignore if should not happen */
if (!token) {
const message = 'Tried to pop an empty stack';
yield { type: 'error', offset: this.offset, source: '', message };
}
else if (this.stack.length === 0) {
yield token;
}
else {
const top = this.peek(1);
if (token.type === 'block-scalar') {
// Block scalars use their parent rather than header indent
token.indent = 'indent' in top ? top.indent : 0;
}
else if (token.type === 'flow-collection' && top.type === 'document') {
// Ignore all indent for top-level flow collections
token.indent = 0;
}
if (token.type === 'flow-collection')
fixFlowSeqItems(token);
switch (top.type) {
case 'document':
top.value = token;
break;
case 'block-scalar':
top.props.push(token); // error
break;
case 'block-map': {
const it = top.items[top.items.length - 1];
if (it.value) {
top.items.push({ start: [], key: token, sep: [] });
this.onKeyLine = true;
return;
}
else if (it.sep) {
it.value = token;
}
else {
Object.assign(it, { key: token, sep: [] });
this.onKeyLine = !it.explicitKey;
return;
}
break;
}
case 'block-seq': {
const it = top.items[top.items.length - 1];
if (it.value)
top.items.push({ start: [], value: token });
else
it.value = token;
break;
}
case 'flow-collection': {
const it = top.items[top.items.length - 1];
if (!it || it.value)
top.items.push({ start: [], key: token, sep: [] });
else if (it.sep)
it.value = token;
else
Object.assign(it, { key: token, sep: [] });
return;
}
/* istanbul ignore next should not happen */
default:
yield* this.pop();
yield* this.pop(token);
}
if ((top.type === 'document' ||
top.type === 'block-map' ||
top.type === 'block-seq') &&
(token.type === 'block-map' || token.type === 'block-seq')) {
const last = token.items[token.items.length - 1];
if (last &&
!last.sep &&
!last.value &&
last.start.length > 0 &&
findNonEmptyIndex(last.start) === -1 &&
(token.indent === 0 ||
last.start.every(st => st.type !== 'comment' || st.indent < token.indent))) {
if (top.type === 'document')
top.end = last.start;
else
top.items.push({ start: last.start });
token.items.splice(-1, 1);
}
}
}
}
*stream() {
switch (this.type) {
case 'directive-line':
yield { type: 'directive', offset: this.offset, source: this.source };
return;
case 'byte-order-mark':
case 'space':
case 'comment':
case 'newline':
yield this.sourceToken;
return;
case 'doc-mode':
case 'doc-start': {
const doc = {
type: 'document',
offset: this.offset,
start: []
};
if (this.type === 'doc-start')
doc.start.push(this.sourceToken);
this.stack.push(doc);
return;
}
}
yield {
type: 'error',
offset: this.offset,
message: `Unexpected ${this.type} token in YAML stream`,
source: this.source
};
}
*document(doc) {
if (doc.value)
return yield* this.lineEnd(doc);
switch (this.type) {
case 'doc-start': {
if (findNonEmptyIndex(doc.start) !== -1) {
yield* this.pop();
yield* this.step();
}
else
doc.start.push(this.sourceToken);
return;
}
case 'anchor':
case 'tag':
case 'space':
case 'comment':
case 'newline':
doc.start.push(this.sourceToken);
return;
}
const bv = this.startBlockValue(doc);
if (bv)
this.stack.push(bv);
else {
yield {
type: 'error',
offset: this.offset,
message: `Unexpected ${this.type} token in YAML document`,
source: this.source
};
}
}
*scalar(scalar) {
if (this.type === 'map-value-ind') {
const prev = getPrevProps(this.peek(2));
const start = getFirstKeyStartProps(prev);
let sep;
if (scalar.end) {
sep = scalar.end;
sep.push(this.sourceToken);
delete scalar.end;
}
else
sep = [this.sourceToken];
const map = {
type: 'block-map',
offset: scalar.offset,
indent: scalar.indent,
items: [{ start, key: scalar, sep }]
};
this.onKeyLine = true;
this.stack[this.stack.length - 1] = map;
}
else
yield* this.lineEnd(scalar);
}
*blockScalar(scalar) {
switch (this.type) {
case 'space':
case 'comment':
case 'newline':
scalar.props.push(this.sourceToken);
return;
case 'scalar':
scalar.source = this.source;
// block-scalar source includes trailing newline
this.atNewLine = true;
this.indent = 0;
if (this.onNewLine) {
let nl = this.source.indexOf('\n') + 1;
while (nl !== 0) {
this.onNewLine(this.offset + nl);
nl = this.source.indexOf('\n', nl) + 1;
}
}
yield* this.pop();
break;
/* istanbul ignore next should not happen */
default:
yield* this.pop();
yield* this.step();
}
}
*blockMap(map) {
const it = map.items[map.items.length - 1];
// it.sep is true-ish if pair already has key or : separator
switch (this.type) {
case 'newline':
this.onKeyLine = false;
if (it.value) {
const end = 'end' in it.value ? it.value.end : undefined;
const last = Array.isArray(end) ? end[end.length - 1] : undefined;
if (last?.type === 'comment')
end?.push(this.sourceToken);
else
map.items.push({ start: [this.sourceToken] });
}
else if (it.sep) {
it.sep.push(this.sourceToken);
}
else {
it.start.push(this.sourceToken);
}
return;
case 'space':
case 'comment':
if (it.value) {
map.items.push({ start: [this.sourceToken] });
}
else if (it.sep) {
it.sep.push(this.sourceToken);
}
else {
if (this.atIndentedComment(it.start, map.indent)) {
const prev = map.items[map.items.length - 2];
const end = prev?.value?.end;
if (Array.isArray(end)) {
Array.prototype.push.apply(end, it.start);
end.push(this.sourceToken);
map.items.pop();
return;
}
}
it.start.push(this.sourceToken);
}
return;
}
if (this.indent >= map.indent) {
const atMapIndent = !this.onKeyLine && this.indent === map.indent;
const atNextItem = atMapIndent &&
(it.sep || it.explicitKey) &&
this.type !== 'seq-item-ind';
// For empty nodes, assign newline-separated not indented empty tokens to following node
let start = [];
if (atNextItem && it.sep && !it.value) {
const nl = [];
for (let i = 0; i < it.sep.length; ++i) {
const st = it.sep[i];
switch (st.type) {
case 'newline':
nl.push(i);
break;
case 'space':
break;
case 'comment':
if (st.indent > map.indent)
nl.length = 0;
break;
default:
nl.length = 0;
}
}
if (nl.length >= 2)
start = it.sep.splice(nl[1]);
}
switch (this.type) {
case 'anchor':
case 'tag':
if (atNextItem || it.value) {
start.push(this.sourceToken);
map.items.push({ start });
this.onKeyLine = true;
}
else if (it.sep) {
it.sep.push(this.sourceToken);
}
else {
it.start.push(this.sourceToken);
}
return;
case 'explicit-key-ind':
if (!it.sep && !it.explicitKey) {
it.start.push(this.sourceToken);
it.explicitKey = true;
}
else if (atNextItem || it.value) {
start.push(this.sourceToken);
map.items.push({ start, explicitKey: true });
}
else {
this.stack.push({
type: 'block-map',
offset: this.offset,
indent: this.indent,
items: [{ start: [this.sourceToken], explicitKey: true }]
});
}
this.onKeyLine = true;
return;
case 'map-value-ind':
if (it.explicitKey) {
if (!it.sep) {
if (includesToken(it.start, 'newline')) {
Object.assign(it, { key: null, sep: [this.sourceToken] });
}
else {
const start = getFirstKeyStartProps(it.start);
this.stack.push({
type: 'block-map',
offset: this.offset,
indent: this.indent,
items: [{ start, key: null, sep: [this.sourceToken] }]
});
}
}
else if (it.value) {
map.items.push({ start: [], key: null, sep: [this.sourceToken] });
}
else if (includesToken(it.sep, 'map-value-ind')) {
this.stack.push({
type: 'block-map',
offset: this.offset,
indent: this.indent,
items: [{ start, key: null, sep: [this.sourceToken] }]
});
}
else if (isFlowToken(it.key) &&
!includesToken(it.sep, 'newline')) {
const start = getFirstKeyStartProps(it.start);
const key = it.key;
const sep = it.sep;
sep.push(this.sourceToken);
// @ts-expect-error type guard is wrong here
delete it.key;
// @ts-expect-error type guard is wrong here
delete it.sep;
this.stack.push({
type: 'block-map',
offset: this.offset,
indent: this.indent,
items: [{ start, key, sep }]
});
}
else if (start.length > 0) {
// Not actually at next item
it.sep = it.sep.concat(start, this.sourceToken);
}
else {
it.sep.push(this.sourceToken);
}
}
else {
if (!it.sep) {
Object.assign(it, { key: null, sep: [this.sourceToken] });
}
else if (it.value || atNextItem) {
map.items.push({ start, key: null, sep: [this.sourceToken] });
}
else if (includesToken(it.sep, 'map-value-ind')) {
this.stack.push({
type: 'block-map',
offset: this.offset,
indent: this.indent,
items: [{ start: [], key: null, sep: [this.sourceToken] }]
});
}
else {
it.sep.push(this.sourceToken);
}
}
this.onKeyLine = true;
return;
case 'alias':
case 'scalar':
case 'single-quoted-scalar':
case 'double-quoted-scalar': {
const fs = this.flowScalar(this.type);
if (atNextItem || it.value) {
map.items.push({ start, key: fs, sep: [] });
this.onKeyLine = true;
}
else if (it.sep) {
this.stack.push(fs);
}
else {
Object.assign(it, { key: fs, sep: [] });
this.onKeyLine = true;
}
return;
}
default: {
const bv = this.startBlockValue(map);
if (bv) {
if (bv.type === 'block-seq') {
if (!it.explicitKey &&
it.sep &&
!includesToken(it.sep, 'newline')) {
yield* this.pop({
type: 'error',
offset: this.offset,
message: 'Unexpected block-seq-ind on same line with key',
source: this.source
});
return;
}
}
else if (atMapIndent) {
map.items.push({ start });
}
this.stack.push(bv);
return;
}
}
}
}
yield* this.pop();
yield* this.step();
}
*blockSequence(seq) {
const it = seq.items[seq.items.length - 1];
switch (this.type) {
case 'newline':
if (it.value) {
const end = 'end' in it.value ? it.value.end : undefined;
const last = Array.isArray(end) ? end[end.length - 1] : undefined;
if (last?.type === 'comment')
end?.push(this.sourceToken);
else
seq.items.push({ start: [this.sourceToken] });
}
else
it.start.push(this.sourceToken);
return;
case 'space':
case 'comment':
if (it.value)
seq.items.push({ start: [this.sourceToken] });
else {
if (this.atIndentedComment(it.start, seq.indent)) {
const prev = seq.items[seq.items.length - 2];
const end = prev?.value?.end;
if (Array.isArray(end)) {
Array.prototype.push.apply(end, it.start);
end.push(this.sourceToken);
seq.items.pop();
return;
}
}
it.start.push(this.sourceToken);
}
return;
case 'anchor':
case 'tag':
if (it.value || this.indent <= seq.indent)
break;
it.start.push(this.sourceToken);
return;
case 'seq-item-ind':
if (this.indent !== seq.indent)
break;
if (it.value || includesToken(it.start, 'seq-item-ind'))
seq.items.push({ start: [this.sourceToken] });
else
it.start.push(this.sourceToken);
return;
}
if (this.indent > seq.indent) {
const bv = this.startBlockValue(seq);
if (bv) {
this.stack.push(bv);
return;
}
}
yield* this.pop();
yield* this.step();
}
*flowCollection(fc) {
const it = fc.items[fc.items.length - 1];
if (this.type === 'flow-error-end') {
let top;
do {
yield* this.pop();
top = this.peek(1);
} while (top && top.type === 'flow-collection');
}
else if (fc.end.length === 0) {
switch (this.type) {
case 'comma':
case 'explicit-key-ind':
if (!it || it.sep)
fc.items.push({ start: [this.sourceToken] });
else
it.start.push(this.sourceToken);
return;
case 'map-value-ind':
if (!it || it.value)
fc.items.push({ start: [], key: null, sep: [this.sourceToken] });
else if (it.sep)
it.sep.push(this.sourceToken);
else
Object.assign(it, { key: null, sep: [this.sourceToken] });
return;
case 'space':
case 'comment':
case 'newline':
case 'anchor':
case 'tag':
if (!it || it.value)
fc.items.push({ start: [this.sourceToken] });
else if (it.sep)
it.sep.push(this.sourceToken);
else
it.start.push(this.sourceToken);
return;
case 'alias':
case 'scalar':
case 'single-quoted-scalar':
case 'double-quoted-scalar': {
const fs = this.flowScalar(this.type);
if (!it || it.value)
fc.items.push({ start: [], key: fs, sep: [] });
else if (it.sep)
this.stack.push(fs);
else
Object.assign(it, { key: fs, sep: [] });
return;
}
case 'flow-map-end':
case 'flow-seq-end':
fc.end.push(this.sourceToken);
return;
}
const bv = this.startBlockValue(fc);
/* istanbul ignore else should not happen */
if (bv)
this.stack.push(bv);
else {
yield* this.pop();
yield* this.step();
}
}
else {
const parent = this.peek(2);
if (parent.type === 'block-map' &&
((this.type === 'map-value-ind' && parent.indent === fc.indent) ||
(this.type === 'newline' &&
!parent.items[parent.items.length - 1].sep))) {
yield* this.pop();
yield* this.step();
}
else if (this.type === 'map-value-ind' &&
parent.type !== 'flow-collection') {
const prev = getPrevProps(parent);
const start = getFirstKeyStartProps(prev);
fixFlowSeqItems(fc);
const sep = fc.end.splice(1, fc.end.length);
sep.push(this.sourceToken);
const map = {
type: 'block-map',
offset: fc.offset,
indent: fc.indent,
items: [{ start, key: fc, sep }]
};
this.onKeyLine = true;
this.stack[this.stack.length - 1] = map;
}
else {
yield* this.lineEnd(fc);
}
}
}
flowScalar(type) {
if (this.onNewLine) {
let nl = this.source.indexOf('\n') + 1;
while (nl !== 0) {
this.onNewLine(this.offset + nl);
nl = this.source.indexOf('\n', nl) + 1;
}
}
return {
type,
offset: this.offset,
indent: this.indent,
source: this.source
};
}
startBlockValue(parent) {
switch (this.type) {
case 'alias':
case 'scalar':
case 'single-quoted-scalar':
case 'double-quoted-scalar':
return this.flowScalar(this.type);
case 'block-scalar-header':
return {
type: 'block-scalar',
offset: this.offset,
indent: this.indent,
props: [this.sourceToken],
source: ''
};
case 'flow-map-start':
case 'flow-seq-start':
return {
type: 'flow-collection',
offset: this.offset,
indent: this.indent,
start: this.sourceToken,
items: [],
end: []
};
case 'seq-item-ind':
return {
type: 'block-seq',
offset: this.offset,
indent: this.indent,
items: [{ start: [this.sourceToken] }]
};
case 'explicit-key-ind': {
this.onKeyLine = true;
const prev = getPrevProps(parent);
const start = getFirstKeyStartProps(prev);
start.push(this.sourceToken);
return {
type: 'block-map',
offset: this.offset,
indent: this.indent,
items: [{ start, explicitKey: true }]
};
}
case 'map-value-ind': {
this.onKeyLine = true;
const prev = getPrevProps(parent);
const start = getFirstKeyStartProps(prev);
return {
type: 'block-map',
offset: this.offset,
indent: this.indent,
items: [{ start, key: null, sep: [this.sourceToken] }]
};
}
}
return null;
}
atIndentedComment(start, indent) {
if (this.type !== 'comment')
return false;
if (this.indent <= indent)
return false;
return start.every(st => st.type === 'newline' || st.type === 'space');
}
*documentEnd(docEnd) {
if (this.type !== 'doc-mode') {
if (docEnd.end)
docEnd.end.push(this.sourceToken);
else
docEnd.end = [this.sourceToken];
if (this.type === 'newline')
yield* this.pop();
}
}
*lineEnd(token) {
switch (this.type) {
case 'comma':
case 'doc-start':
case 'doc-end':
case 'flow-seq-end':
case 'flow-map-end':
case 'map-value-ind':
yield* this.pop();
yield* this.step();
break;
case 'newline':
this.onKeyLine = false;
// fallthrough
case 'space':
case 'comment':
default:
// all other values are errors
if (token.end)
token.end.push(this.sourceToken);
else
token.end = [this.sourceToken];
if (this.type === 'newline')
yield* this.pop();
}
}
}
exports
frontend/node_modules/yaml/dist/parse/line-counter.js (Line 3:1 - Line 41:8), frontend/node_modules/yaml/browser/dist/parse/line-counter.js (Line 1:1 - Line 39:7)
/**
* Tracks newlines during parsing in order to provide an efficient API for
* determining the one-indexed `{ line, col }` position for any offset
* within the input.
*/
class LineCounter {
constructor() {
this.lineStarts = [];
/**
* Should be called in ascending order. Otherwise, call
* `lineCounter.lineStarts.sort()` before calling `linePos()`.
*/
this.addNewLine = (offset) => this.lineStarts.push(offset);
/**
* Performs a binary search and returns the 1-indexed { line, col }
* position of `offset`. If `line === 0`, `addNewLine` has never been
* called or `offset` is before the first known newline.
*/
this.linePos = (offset) => {
let low = 0;
let high = this.lineStarts.length;
while (low < high) {
const mid = (low + high) >> 1; // Math.floor((low + high) / 2)
if (this.lineStarts[mid] < offset)
low = mid + 1;
else
high = mid;
}
if (this.lineStarts[low] === offset)
return { line: low + 1, col: 1 };
if (low === 0)
return { line: 0, col: offset };
const start = this.lineStarts[low - 1];
return { line: low, col: offset - start + 1 };
};
}
}
exports
frontend/node_modules/yaml/dist/parse/lexer.js (Line 3:2 - Line 249:4), frontend/node_modules/yaml/browser/dist/parse/lexer.js (Line 1:11 - Line 247:4)
;
/*
START -> stream
stream
directive -> line-end -> stream
indent + line-end -> stream
[else] -> line-start
line-end
comment -> line-end
newline -> .
input-end -> END
line-start
doc-start -> doc
doc-end -> stream
[else] -> indent -> block-start
block-start
seq-item-start -> block-start
explicit-key-start -> block-start
map-value-start -> block-start
[else] -> doc
doc
line-end -> line-start
spaces -> doc
anchor -> doc
tag -> doc
flow-start -> flow -> doc
flow-end -> error -> doc
seq-item-start -> error -> doc
explicit-key-start -> error -> doc
map-value-start -> doc
alias -> doc
quote-start -> quoted-scalar -> doc
block-scalar-header -> line-end -> block-scalar(min) -> line-start
[else] -> plain-scalar(false, min) -> doc
flow
line-end -> flow
spaces -> flow
anchor -> flow
tag -> flow
flow-start -> flow -> flow
flow-end -> .
seq-item-start -> error -> flow
explicit-key-start -> flow
map-value-start -> flow
alias -> flow
quote-start -> quoted-scalar -> flow
comma -> flow
[else] -> plain-scalar(true, 0) -> flow
quoted-scalar
quote-end -> .
[else] -> quoted-scalar
block-scalar(min)
newline + peek(indent < min) -> .
[else] -> block-scalar(min)
plain-scalar(is-flow, min)
scalar-end(is-flow) -> .
peek(newline + (indent < min)) -> .
[else] -> plain-scalar(min)
*/
function isEmpty(ch) {
switch (ch) {
case undefined:
case ' ':
case '\n':
case '\r':
case '\t':
return true;
default:
return false;
}
}
const hexDigits = new Set('0123456789ABCDEFabcdef');
const tagChars = new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()");
const flowIndicatorChars = new Set(',[]{}');
const invalidAnchorChars = new Set(' ,[]{}\n\r\t');
const isNotAnchorChar = (ch) => !ch || invalidAnchorChars.has(ch);
/**
* Splits an input string into lexical tokens, i.e. smaller strings that are
* easily identifiable by `tokens.tokenType()`.
*
* Lexing starts always in a "stream" context. Incomplete input may be buffered
* until a complete token can be emitted.
*
* In addition to slices of the original input, the following control characters
* may also be emitted:
*
* - `\x02` (Start of Text): A document starts with the next token
* - `\x18` (Cancel): Unexpected end of flow-mode (indicates an error)
* - `\x1f` (Unit Separator): Next token is a scalar value
* - `\u{FEFF}` (Byte order mark): Emitted separately outside documents
*/
class Lexer {
constructor() {
/**
* Flag indicating whether the end of the current buffer marks the end of
* all input
*/
this.atEnd = false;
/**
* Explicit indent set in block scalar header, as an offset from the current
* minimum indent, so e.g. set to 1 from a header `|2+`. Set to -1 if not
* explicitly set.
*/
this.blockScalarIndent = -1;
/**
* Block scalars that include a + (keep) chomping indicator in their header
* include trailing empty lines, which are otherwise excluded from the
* scalar's contents.
*/
this.blockScalarKeep = false;
/** Current input */
this.buffer = '';
/**
* Flag noting whether the map value indicator : can immediately follow this
* node within a flow context.
*/
this.flowKey = false;
/** Count of surrounding flow collection levels. */
this.flowLevel = 0;
/**
* Minimum level of indentation required for next lines to be parsed as a
* part of the current scalar value.
*/
this.indentNext = 0;
/** Indentation level of the current line. */
this.indentValue = 0;
/** Position of the next \n character. */
this.lineEndPos = null;
/** Stores the state of the lexer if reaching the end of incpomplete input */
this.next = null;
/** A pointer to `buffer`; the current position of the lexer. */
this.pos = 0;
}
/**
* Generate YAML tokens from the `source` string. If `incomplete`,
* a part of the last line may be left as a buffer for the next call.
*
* @returns A generator of lexical tokens
*/
*lex(source, incomplete = false) {
if (source) {
if (typeof source !== 'string')
throw TypeError('source is not a string');
this.buffer = this.buffer ? this.buffer + source : source;
this.lineEndPos = null;
}
this.atEnd = !incomplete;
let next = this.next ?? 'stream';
while (next && (incomplete || this.hasChars(1)))
next = yield* this.parseNext(next);
}
atLineEnd() {
let i = this.pos;
let ch = this.buffer[i];
while (ch === ' ' || ch === '\t')
ch = this.buffer[++i];
if (!ch || ch === '#' || ch === '\n')
return true;
if (ch === '\r')
return this.buffer[i + 1] === '\n';
return false;
}
charAt(n) {
return this.buffer[this.pos + n];
}
continueScalar(offset) {
let ch = this.buffer[offset];
if (this.indentNext > 0) {
let indent = 0;
while (ch === ' ')
ch = this.buffer[++indent + offset];
if (ch === '\r') {
const next = this.buffer[indent + offset + 1];
if (next === '\n' || (!next && !this.atEnd))
return offset + indent + 1;
}
return ch === '\n' || indent >= this.indentNext || (!ch && !this.atEnd)
? offset + indent
: -1;
}
if (ch === '-' || ch === '.') {
const dt = this.buffer.substr(offset, 3);
if ((dt === '---' || dt === '...') && isEmpty(this.buffer[offset + 3]))
return -1;
}
return offset;
}
getLine() {
let end = this.lineEndPos;
if (typeof end !== 'number' || (end !== -1 && end < this.pos)) {
end = this.buffer.indexOf('\n', this.pos);
this.lineEndPos = end;
}
if (end === -1)
return this.atEnd ? this.buffer.substring(this.pos) : null;
if (this.buffer[end - 1] === '\r')
end -= 1;
return this.buffer.substring(this.pos, end);
}
hasChars(n) {
return this.pos + n <= this.buffer.length;
}
setNext(state) {
this.buffer = this.buffer.substring(this.pos);
this.pos = 0;
this.lineEndPos = null;
this.next = state;
return null;
}
peek(n) {
return this.buffer.substr(this.pos, n);
}
*parseNext(next) {
switch (next) {
case 'stream':
return yield* this.parseStream();
case 'line-start':
return yield* this.parseLineStart();
case 'block-start':
return yield* this.parseBlockStart();
case 'doc':
return yield* this.parseDocument();
case 'flow':
return yield* this.parseFlowCollection();
case 'quoted-scalar':
return yield* this.parseQuotedScalar();
case 'block-scalar':
return yield* this.parseBlockScalar();
case 'plain-scalar':
return yield* this.parsePlainScalar();
}
}
*parseStream() {
let line = this.getLine();
if (line === null)
return this.setNext('stream');
if (line[0] === cst
frontend/node_modules/yaml/dist/parse/lexer.js (Line 249:2 - Line 284:4), frontend/node_modules/yaml/browser/dist/parse/lexer.js (Line 247:2 - Line 282:9)
frontend/node_modules/yaml/dist/parse/lexer.js (Line 284:2 - Line 390:4), frontend/node_modules/yaml/browser/dist/parse/lexer.js (Line 282:2 - Line 388:9)
DOCUMENT;
return yield* this.parseLineStart();
}
*parseLineStart() {
const ch = this.charAt(0);
if (!ch && !this.atEnd)
return this.setNext('line-start');
if (ch === '-' || ch === '.') {
if (!this.atEnd && !this.hasChars(4))
return this.setNext('line-start');
const s = this.peek(3);
if ((s === '---' || s === '...') && isEmpty(this.charAt(3))) {
yield* this.pushCount(3);
this.indentValue = 0;
this.indentNext = 0;
return s === '---' ? 'doc' : 'stream';
}
}
this.indentValue = yield* this.pushSpaces(false);
if (this.indentNext > this.indentValue && !isEmpty(this.charAt(1)))
this.indentNext = this.indentValue;
return yield* this.parseBlockStart();
}
*parseBlockStart() {
const [ch0, ch1] = this.peek(2);
if (!ch1 && !this.atEnd)
return this.setNext('block-start');
if ((ch0 === '-' || ch0 === '?' || ch0 === ':') && isEmpty(ch1)) {
const n = (yield* this.pushCount(1)) + (yield* this.pushSpaces(true));
this.indentNext = this.indentValue + 1;
this.indentValue += n;
return yield* this.parseBlockStart();
}
return 'doc';
}
*parseDocument() {
yield* this.pushSpaces(true);
const line = this.getLine();
if (line === null)
return this.setNext('doc');
let n = yield* this.pushIndicators();
switch (line[n]) {
case '#':
yield* this.pushCount(line.length - n);
// fallthrough
case undefined:
yield* this.pushNewline();
return yield* this.parseLineStart();
case '{':
case '[':
yield* this.pushCount(1);
this.flowKey = false;
this.flowLevel = 1;
return 'flow';
case '}':
case ']':
// this is an error
yield* this.pushCount(1);
return 'doc';
case '*':
yield* this.pushUntil(isNotAnchorChar);
return 'doc';
case '"':
case "'":
return yield* this.parseQuotedScalar();
case '|':
case '>':
n += yield* this.parseBlockScalarHeader();
n += yield* this.pushSpaces(true);
yield* this.pushCount(line.length - n);
yield* this.pushNewline();
return yield* this.parseBlockScalar();
default:
return yield* this.parsePlainScalar();
}
}
*parseFlowCollection() {
let nl, sp;
let indent = -1;
do {
nl = yield* this.pushNewline();
if (nl > 0) {
sp = yield* this.pushSpaces(false);
this.indentValue = indent = sp;
}
else {
sp = 0;
}
sp += yield* this.pushSpaces(true);
} while (nl + sp > 0);
const line = this.getLine();
if (line === null)
return this.setNext('flow');
if ((indent !== -1 && indent < this.indentNext && line[0] !== '#') ||
(indent === 0 &&
(line.startsWith('---') || line.startsWith('...')) &&
isEmpty(line[3]))) {
// Allowing for the terminal ] or } at the same (rather than greater)
// indent level as the initial [ or { is technically invalid, but
// failing here would be surprising to users.
const atFlowEndMarker = indent === this.indentNext - 1 &&
this.flowLevel === 1 &&
(line[0] === ']' || line[0] === '}');
if (!atFlowEndMarker) {
// this is an error
this.flowLevel = 0;
yield cst
frontend/node_modules/yaml/dist/parse/lexer.js (Line 390:2 - Line 568:4), frontend/node_modules/yaml/browser/dist/parse/lexer.js (Line 388:2 - Line 566:7)
FLOW_END;
return yield* this.parseLineStart();
}
}
let n = 0;
while (line[n] === ',') {
n += yield* this.pushCount(1);
n += yield* this.pushSpaces(true);
this.flowKey = false;
}
n += yield* this.pushIndicators();
switch (line[n]) {
case undefined:
return 'flow';
case '#':
yield* this.pushCount(line.length - n);
return 'flow';
case '{':
case '[':
yield* this.pushCount(1);
this.flowKey = false;
this.flowLevel += 1;
return 'flow';
case '}':
case ']':
yield* this.pushCount(1);
this.flowKey = true;
this.flowLevel -= 1;
return this.flowLevel ? 'flow' : 'doc';
case '*':
yield* this.pushUntil(isNotAnchorChar);
return 'flow';
case '"':
case "'":
this.flowKey = true;
return yield* this.parseQuotedScalar();
case ':': {
const next = this.charAt(1);
if (this.flowKey || isEmpty(next) || next === ',') {
this.flowKey = false;
yield* this.pushCount(1);
yield* this.pushSpaces(true);
return 'flow';
}
}
// fallthrough
default:
this.flowKey = false;
return yield* this.parsePlainScalar();
}
}
*parseQuotedScalar() {
const quote = this.charAt(0);
let end = this.buffer.indexOf(quote, this.pos + 1);
if (quote === "'") {
while (end !== -1 && this.buffer[end + 1] === "'")
end = this.buffer.indexOf("'", end + 2);
}
else {
// double-quote
while (end !== -1) {
let n = 0;
while (this.buffer[end - 1 - n] === '\\')
n += 1;
if (n % 2 === 0)
break;
end = this.buffer.indexOf('"', end + 1);
}
}
// Only looking for newlines within the quotes
const qb = this.buffer.substring(0, end);
let nl = qb.indexOf('\n', this.pos);
if (nl !== -1) {
while (nl !== -1) {
const cs = this.continueScalar(nl + 1);
if (cs === -1)
break;
nl = qb.indexOf('\n', cs);
}
if (nl !== -1) {
// this is an error caused by an unexpected unindent
end = nl - (qb[nl - 1] === '\r' ? 2 : 1);
}
}
if (end === -1) {
if (!this.atEnd)
return this.setNext('quoted-scalar');
end = this.buffer.length;
}
yield* this.pushToIndex(end + 1, false);
return this.flowLevel ? 'flow' : 'doc';
}
*parseBlockScalarHeader() {
this.blockScalarIndent = -1;
this.blockScalarKeep = false;
let i = this.pos;
while (true) {
const ch = this.buffer[++i];
if (ch === '+')
this.blockScalarKeep = true;
else if (ch > '0' && ch <= '9')
this.blockScalarIndent = Number(ch) - 1;
else if (ch !== '-')
break;
}
return yield* this.pushUntil(ch => isEmpty(ch) || ch === '#');
}
*parseBlockScalar() {
let nl = this.pos - 1; // may be -1 if this.pos === 0
let indent = 0;
let ch;
loop: for (let i = this.pos; (ch = this.buffer[i]); ++i) {
switch (ch) {
case ' ':
indent += 1;
break;
case '\n':
nl = i;
indent = 0;
break;
case '\r': {
const next = this.buffer[i + 1];
if (!next && !this.atEnd)
return this.setNext('block-scalar');
if (next === '\n')
break;
} // fallthrough
default:
break loop;
}
}
if (!ch && !this.atEnd)
return this.setNext('block-scalar');
if (indent >= this.indentNext) {
if (this.blockScalarIndent === -1)
this.indentNext = indent;
else {
this.indentNext =
this.blockScalarIndent + (this.indentNext === 0 ? 1 : this.indentNext);
}
do {
const cs = this.continueScalar(nl + 1);
if (cs === -1)
break;
nl = this.buffer.indexOf('\n', cs);
} while (nl !== -1);
if (nl === -1) {
if (!this.atEnd)
return this.setNext('block-scalar');
nl = this.buffer.length;
}
}
// Trailing insufficiently indented tabs are invalid.
// To catch that during parsing, we include them in the block scalar value.
let i = nl + 1;
ch = this.buffer[i];
while (ch === ' ')
ch = this.buffer[++i];
if (ch === '\t') {
while (ch === '\t' || ch === ' ' || ch === '\r' || ch === '\n')
ch = this.buffer[++i];
nl = i - 1;
}
else if (!this.blockScalarKeep) {
do {
let i = nl - 1;
let ch = this.buffer[i];
if (ch === '\r')
ch = this.buffer[--i];
const lastChar = i; // Drop the line if last char not more indented
while (ch === ' ')
ch = this.buffer[--i];
if (ch === '\n' && i >= this.pos && i + 1 + indent > lastChar)
nl = i;
else
break;
} while (true);
}
yield cst
frontend/node_modules/yaml/dist/parse/lexer.js (Line 568:2 - Line 612:4), frontend/node_modules/yaml/browser/dist/parse/lexer.js (Line 566:2 - Line 610:7)
SCALAR;
yield* this.pushToIndex(nl + 1, true);
return yield* this.parseLineStart();
}
*parsePlainScalar() {
const inFlow = this.flowLevel > 0;
let end = this.pos - 1;
let i = this.pos - 1;
let ch;
while ((ch = this.buffer[++i])) {
if (ch === ':') {
const next = this.buffer[i + 1];
if (isEmpty(next) || (inFlow && flowIndicatorChars.has(next)))
break;
end = i;
}
else if (isEmpty(ch)) {
let next = this.buffer[i + 1];
if (ch === '\r') {
if (next === '\n') {
i += 1;
ch = '\n';
next = this.buffer[i + 1];
}
else
end = i;
}
if (next === '#' || (inFlow && flowIndicatorChars.has(next)))
break;
if (ch === '\n') {
const cs = this.continueScalar(i + 1);
if (cs === -1)
break;
i = Math.max(i, cs - 2); // to advance, but still account for ' #'
}
}
else {
if (inFlow && flowIndicatorChars.has(ch))
break;
end = i;
}
}
if (!ch && !this.atEnd)
return this.setNext('plain-scalar');
yield cst
frontend/node_modules/yaml/dist/parse/lexer.js (Line 612:2 - Line 719:8), frontend/node_modules/yaml/browser/dist/parse/lexer.js (Line 610:2 - Line 717:7)
SCALAR;
yield* this.pushToIndex(end + 1, true);
return inFlow ? 'flow' : 'doc';
}
*pushCount(n) {
if (n > 0) {
yield this.buffer.substr(this.pos, n);
this.pos += n;
return n;
}
return 0;
}
*pushToIndex(i, allowEmpty) {
const s = this.buffer.slice(this.pos, i);
if (s) {
yield s;
this.pos += s.length;
return s.length;
}
else if (allowEmpty)
yield '';
return 0;
}
*pushIndicators() {
switch (this.charAt(0)) {
case '!':
return ((yield* this.pushTag()) +
(yield* this.pushSpaces(true)) +
(yield* this.pushIndicators()));
case '&':
return ((yield* this.pushUntil(isNotAnchorChar)) +
(yield* this.pushSpaces(true)) +
(yield* this.pushIndicators()));
case '-': // this is an error
case '?': // this is an error outside flow collections
case ':': {
const inFlow = this.flowLevel > 0;
const ch1 = this.charAt(1);
if (isEmpty(ch1) || (inFlow && flowIndicatorChars.has(ch1))) {
if (!inFlow)
this.indentNext = this.indentValue + 1;
else if (this.flowKey)
this.flowKey = false;
return ((yield* this.pushCount(1)) +
(yield* this.pushSpaces(true)) +
(yield* this.pushIndicators()));
}
}
}
return 0;
}
*pushTag() {
if (this.charAt(1) === '<') {
let i = this.pos + 2;
let ch = this.buffer[i];
while (!isEmpty(ch) && ch !== '>')
ch = this.buffer[++i];
return yield* this.pushToIndex(ch === '>' ? i + 1 : i, false);
}
else {
let i = this.pos + 1;
let ch = this.buffer[i];
while (ch) {
if (tagChars.has(ch))
ch = this.buffer[++i];
else if (ch === '%' &&
hexDigits.has(this.buffer[i + 1]) &&
hexDigits.has(this.buffer[i + 2])) {
ch = this.buffer[(i += 3)];
}
else
break;
}
return yield* this.pushToIndex(i, false);
}
}
*pushNewline() {
const ch = this.buffer[this.pos];
if (ch === '\n')
return yield* this.pushCount(1);
else if (ch === '\r' && this.charAt(1) === '\n')
return yield* this.pushCount(2);
else
return 0;
}
*pushSpaces(allowTabs) {
let i = this.pos - 1;
let ch;
do {
ch = this.buffer[++i];
} while (ch === ' ' || (allowTabs && ch === '\t'));
const n = i - this.pos;
if (n > 0) {
yield this.buffer.substr(this.pos, n);
this.pos = i;
}
return n;
}
*pushUntil(test) {
let i = this.pos;
let ch = this.buffer[i];
while (!test(ch))
ch = this.buffer[++i];
return yield* this.pushToIndex(i, false);
}
}
exports
frontend/node_modules/yaml/dist/parse/cst.js (Line 5:2 - Line 100:8), frontend/node_modules/yaml/browser/dist/parse/cst.js (Line 3:17 - Line 98:7)
;
/** The byte order mark */
const BOM = '\u{FEFF}';
/** Start of doc-mode */
const DOCUMENT = '\x02'; // C0: Start of Text
/** Unexpected end of flow-mode */
const FLOW_END = '\x18'; // C0: Cancel
/** Next token is a scalar value */
const SCALAR = '\x1f'; // C0: Unit Separator
/** @returns `true` if `token` is a flow or block collection */
const isCollection = (token) => !!token && 'items' in token;
/** @returns `true` if `token` is a flow or block scalar; not an alias */
const isScalar = (token) => !!token &&
(token.type === 'scalar' ||
token.type === 'single-quoted-scalar' ||
token.type === 'double-quoted-scalar' ||
token.type === 'block-scalar');
/* istanbul ignore next */
/** Get a printable representation of a lexer token */
function prettyToken(token) {
switch (token) {
case BOM:
return '<BOM>';
case DOCUMENT:
return '<DOC>';
case FLOW_END:
return '<FLOW_END>';
case SCALAR:
return '<SCALAR>';
default:
return JSON.stringify(token);
}
}
/** Identify the type of a lexer token. May return `null` for unknown tokens. */
function tokenType(source) {
switch (source) {
case BOM:
return 'byte-order-mark';
case DOCUMENT:
return 'doc-mode';
case FLOW_END:
return 'flow-error-end';
case SCALAR:
return 'scalar';
case '---':
return 'doc-start';
case '...':
return 'doc-end';
case '':
case '\n':
case '\r\n':
return 'newline';
case '-':
return 'seq-item-ind';
case '?':
return 'explicit-key-ind';
case ':':
return 'map-value-ind';
case '{':
return 'flow-map-start';
case '}':
return 'flow-map-end';
case '[':
return 'flow-seq-start';
case ']':
return 'flow-seq-end';
case ',':
return 'comma';
}
switch (source[0]) {
case ' ':
case '\t':
return 'space';
case '#':
return 'comment';
case '%':
return 'directive-line';
case '*':
return 'alias';
case '&':
return 'anchor';
case '!':
return 'tag';
case "'":
return 'single-quoted-scalar';
case '"':
return 'double-quoted-scalar';
case '|':
case '>':
return 'block-scalar-header';
}
return null;
}
exports
frontend/node_modules/yaml/dist/parse/cst-visit.js (Line 3:1 - Line 99:8), frontend/node_modules/yaml/browser/dist/parse/cst-visit.js (Line 1:1 - Line 97:7)
const BREAK = Symbol('break visit');
const SKIP = Symbol('skip children');
const REMOVE = Symbol('remove item');
/**
* Apply a visitor to a CST document or item.
*
* Walks through the tree (depth-first) starting from the root, calling a
* `visitor` function with two arguments when entering each item:
* - `item`: The current item, which included the following members:
* - `start: SourceToken[]` – Source tokens before the key or value,
* possibly including its anchor or tag.
* - `key?: Token | null` – Set for pair values. May then be `null`, if
* the key before the `:` separator is empty.
* - `sep?: SourceToken[]` – Source tokens between the key and the value,
* which should include the `:` map value indicator if `value` is set.
* - `value?: Token` – The value of a sequence item, or of a map pair.
* - `path`: The steps from the root to the current node, as an array of
* `['key' | 'value', number]` tuples.
*
* The return value of the visitor may be used to control the traversal:
* - `undefined` (default): Do nothing and continue
* - `visit.SKIP`: Do not visit the children of this token, continue with
* next sibling
* - `visit.BREAK`: Terminate traversal completely
* - `visit.REMOVE`: Remove the current item, then continue with the next one
* - `number`: Set the index of the next step. This is useful especially if
* the index of the current token has changed.
* - `function`: Define the next visitor for this item. After the original
* visitor is called on item entry, next visitors are called after handling
* a non-empty `key` and when exiting the item.
*/
function visit(cst, visitor) {
if ('type' in cst && cst.type === 'document')
cst = { start: cst.start, value: cst.value };
_visit(Object.freeze([]), cst, visitor);
}
// Without the `as symbol` casts, TS declares these in the `visit`
// namespace using `var`, but then complains about that because
// `unique symbol` must be `const`.
/** Terminate visit traversal completely */
visit.BREAK = BREAK;
/** Do not visit the children of the current item */
visit.SKIP = SKIP;
/** Remove the current item */
visit.REMOVE = REMOVE;
/** Find the item at `path` from `cst` as the root */
visit.itemAtPath = (cst, path) => {
let item = cst;
for (const [field, index] of path) {
const tok = item?.[field];
if (tok && 'items' in tok) {
item = tok.items[index];
}
else
return undefined;
}
return item;
};
/**
* Get the immediate parent collection of the item at `path` from `cst` as the root.
*
* Throws an error if the collection is not found, which should never happen if the item itself exists.
*/
visit.parentCollection = (cst, path) => {
const parent = visit.itemAtPath(cst, path.slice(0, -1));
const field = path[path.length - 1][0];
const coll = parent?.[field];
if (coll && 'items' in coll)
return coll;
throw new Error('Parent collection not found');
};
function _visit(path, item, visitor) {
let ctrl = visitor(item, path);
if (typeof ctrl === 'symbol')
return ctrl;
for (const field of ['key', 'value']) {
const token = item[field];
if (token && 'items' in token) {
for (let i = 0; i < token.items.length; ++i) {
const ci = _visit(Object.freeze(path.concat([[field, i]])), token.items[i], visitor);
if (typeof ci === 'number')
i = ci - 1;
else if (ci === BREAK)
return BREAK;
else if (ci === REMOVE) {
token.items.splice(i, 1);
i -= 1;
}
}
if (typeof ctrl === 'function' && field === 'key')
ctrl = ctrl(item, path);
}
}
return typeof ctrl === 'function' ? ctrl(item, path) : ctrl;
}
exports
frontend/node_modules/yaml/dist/parse/cst-stringify.js (Line 3:1 - Line 63:8), frontend/node_modules/yaml/browser/dist/parse/cst-stringify.js (Line 1:1 - Line 61:7)
/**
* Stringify a CST document, token, or collection item
*
* Fair warning: This applies no validation whatsoever, and
* simply concatenates the sources in their logical order.
*/
const stringify = (cst) => 'type' in cst ? stringifyToken(cst) : stringifyItem(cst);
function stringifyToken(token) {
switch (token.type) {
case 'block-scalar': {
let res = '';
for (const tok of token.props)
res += stringifyToken(tok);
return res + token.source;
}
case 'block-map':
case 'block-seq': {
let res = '';
for (const item of token.items)
res += stringifyItem(item);
return res;
}
case 'flow-collection': {
let res = token.start.source;
for (const item of token.items)
res += stringifyItem(item);
for (const st of token.end)
res += st.source;
return res;
}
case 'document': {
let res = stringifyItem(token);
if (token.end)
for (const st of token.end)
res += st.source;
return res;
}
default: {
let res = token.source;
if ('end' in token && token.end)
for (const st of token.end)
res += st.source;
return res;
}
}
}
function stringifyItem({ start, key, sep, value }) {
let res = '';
for (const st of start)
res += st.source;
if (key)
res += stringifyToken(key);
if (sep)
for (const st of sep)
res += st.source;
if (value)
res += stringifyToken(value);
return res;
}
exports
frontend/node_modules/yaml/dist/parse/cst-scalar.js (Line 6:2 - Line 15:7), frontend/node_modules/yaml/browser/dist/parse/cst-scalar.js (Line 4:34 - Line 13:15)
frontend/node_modules/yaml/dist/parse/cst-scalar.js (Line 23:2 - Line 44:16), frontend/node_modules/yaml/browser/dist/parse/cst-scalar.js (Line 21:2 - Line 42:16)
resolveBlockScalar({ options: { strict } }, token, _onError);
}
}
return null;
}
/**
* Create a new scalar token with `value`
*
* Values that represent an actual string but may be parsed as a different type should use a `type` other than `'PLAIN'`,
* as this function does not support any schema operations and won't check for such conflicts.
*
* @param value The string representation of the value, which will have its content properly indented.
* @param context.end Comments and whitespace after the end of the value, or after the block scalar header. If undefined, a newline will be added.
* @param context.implicitKey Being within an implicit key may affect the resolved type of the token's value.
* @param context.indent The indent level of the token.
* @param context.inFlow Is this scalar within a flow collection? This may affect the resolved type of the token's value.
* @param context.offset The offset position of the token.
* @param context.type The preferred type of the scalar token. If undefined, the previous type of the `token` will be used, defaulting to `'PLAIN'`.
*/
function createScalarToken(value, context) {
const { implicitKey = false, indent, inFlow = false, offset = -1, type = 'PLAIN' } = context;
const source = stringifyString
frontend/node_modules/yaml/dist/parse/cst-scalar.js (Line 44:2 - Line 113:16), frontend/node_modules/yaml/browser/dist/parse/cst-scalar.js (Line 42:2 - Line 111:16)
stringifyString({ type, value }, {
implicitKey,
indent: indent > 0 ? ' '.repeat(indent) : '',
inFlow,
options: { blockQuote: true, lineWidth: -1 }
});
const end = context.end ?? [
{ type: 'newline', offset: -1, indent, source: '\n' }
];
switch (source[0]) {
case '|':
case '>': {
const he = source.indexOf('\n');
const head = source.substring(0, he);
const body = source.substring(he + 1) + '\n';
const props = [
{ type: 'block-scalar-header', offset, indent, source: head }
];
if (!addEndtoBlockProps(props, end))
props.push({ type: 'newline', offset: -1, indent, source: '\n' });
return { type: 'block-scalar', offset, indent, props, source: body };
}
case '"':
return { type: 'double-quoted-scalar', offset, indent, source, end };
case "'":
return { type: 'single-quoted-scalar', offset, indent, source, end };
default:
return { type: 'scalar', offset, indent, source, end };
}
}
/**
* Set the value of `token` to the given string `value`, overwriting any previous contents and type that it may have.
*
* Best efforts are made to retain any comments previously associated with the `token`,
* though all contents within a collection's `items` will be overwritten.
*
* Values that represent an actual string but may be parsed as a different type should use a `type` other than `'PLAIN'`,
* as this function does not support any schema operations and won't check for such conflicts.
*
* @param token Any token. If it does not include an `indent` value, the value will be stringified as if it were an implicit key.
* @param value The string representation of the value, which will have its content properly indented.
* @param context.afterKey In most cases, values after a key should have an additional level of indentation.
* @param context.implicitKey Being within an implicit key may affect the resolved type of the token's value.
* @param context.inFlow Being within a flow collection may affect the resolved type of the token's value.
* @param context.type The preferred type of the scalar token. If undefined, the previous type of the `token` will be used, defaulting to `'PLAIN'`.
*/
function setScalarValue(token, value, context = {}) {
let { afterKey = false, implicitKey = false, inFlow = false, type } = context;
let indent = 'indent' in token ? token.indent : null;
if (afterKey && typeof indent === 'number')
indent += 2;
if (!type)
switch (token.type) {
case 'single-quoted-scalar':
type = 'QUOTE_SINGLE';
break;
case 'double-quoted-scalar':
type = 'QUOTE_DOUBLE';
break;
case 'block-scalar': {
const header = token.props[0];
if (header.type !== 'block-scalar-header')
throw new Error('Invalid block scalar header');
type = header.source[0] === '>' ? 'BLOCK_FOLDED' : 'BLOCK_LITERAL';
break;
}
default:
type = 'PLAIN';
}
const source = stringifyString
frontend/node_modules/yaml/dist/parse/cst-scalar.js (Line 113:2 - Line 216:8), frontend/node_modules/yaml/browser/dist/parse/cst-scalar.js (Line 111:2 - Line 214:7)
stringifyString({ type, value }, {
implicitKey: implicitKey || indent === null,
indent: indent !== null && indent > 0 ? ' '.repeat(indent) : '',
inFlow,
options: { blockQuote: true, lineWidth: -1 }
});
switch (source[0]) {
case '|':
case '>':
setBlockScalarValue(token, source);
break;
case '"':
setFlowScalarValue(token, source, 'double-quoted-scalar');
break;
case "'":
setFlowScalarValue(token, source, 'single-quoted-scalar');
break;
default:
setFlowScalarValue(token, source, 'scalar');
}
}
function setBlockScalarValue(token, source) {
const he = source.indexOf('\n');
const head = source.substring(0, he);
const body = source.substring(he + 1) + '\n';
if (token.type === 'block-scalar') {
const header = token.props[0];
if (header.type !== 'block-scalar-header')
throw new Error('Invalid block scalar header');
header.source = head;
token.source = body;
}
else {
const { offset } = token;
const indent = 'indent' in token ? token.indent : -1;
const props = [
{ type: 'block-scalar-header', offset, indent, source: head }
];
if (!addEndtoBlockProps(props, 'end' in token ? token.end : undefined))
props.push({ type: 'newline', offset: -1, indent, source: '\n' });
for (const key of Object.keys(token))
if (key !== 'type' && key !== 'offset')
delete token[key];
Object.assign(token, { type: 'block-scalar', indent, props, source: body });
}
}
/** @returns `true` if last token is a newline */
function addEndtoBlockProps(props, end) {
if (end)
for (const st of end)
switch (st.type) {
case 'space':
case 'comment':
props.push(st);
break;
case 'newline':
props.push(st);
return true;
}
return false;
}
function setFlowScalarValue(token, source, type) {
switch (token.type) {
case 'scalar':
case 'double-quoted-scalar':
case 'single-quoted-scalar':
token.type = type;
token.source = source;
break;
case 'block-scalar': {
const end = token.props.slice(1);
let oa = source.length;
if (token.props[0].type === 'block-scalar-header')
oa -= token.props[0].source.length;
for (const tok of end)
tok.offset += oa;
delete token.props;
Object.assign(token, { type, source, end });
break;
}
case 'block-map':
case 'block-seq': {
const offset = token.offset + source.length;
const nl = { type: 'newline', offset, indent: token.indent, source: '\n' };
delete token.items;
Object.assign(token, { type, source, end: [nl] });
break;
}
default: {
const indent = 'indent' in token ? token.indent : -1;
const end = 'end' in token && Array.isArray(token.end)
? token.end.filter(st => st.type === 'space' ||
st.type === 'comment' ||
st.type === 'newline')
: [];
for (const key of Object.keys(token))
if (key !== 'type' && key !== 'offset')
delete token[key];
Object.assign(token, { type, indent, source, end });
}
}
}
exports
frontend/node_modules/yaml/dist/nodes/toJS.js (Line 3:2 - Line 21:9), frontend/node_modules/yaml/browser/dist/nodes/toJS.js (Line 1:16 - Line 19:10)
;
/**
* Recursively convert any node or its contents to native JavaScript
*
* @param value - The input value
* @param arg - If `value` defines a `toJSON()` method, use this
* as its first argument
* @param ctx - Conversion context, originally set in Document#toJS(). If
* `{ keep: true }` is not set, output should be suitable for JSON
* stringification.
*/
function toJS(value, arg, ctx) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
if (Array.isArray(value))
return value.map((v, i) => toJS(v, String(i), ctx));
if (value && typeof value.toJSON === 'function') {
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
if (!ctx || !identity
frontend/node_modules/yaml/dist/nodes/toJS.js (Line 21:2 - Line 39:8), frontend/node_modules/yaml/browser/dist/nodes/toJS.js (Line 19:2 - Line 37:7)
hasAnchor(value))
return value.toJSON(arg, ctx);
const data = { aliasCount: 0, count: 1, res: undefined };
ctx.anchors.set(value, data);
ctx.onCreate = res => {
data.res = res;
delete ctx.onCreate;
};
const res = value.toJSON(arg, ctx);
if (ctx.onCreate)
ctx.onCreate(res);
return res;
}
if (typeof value === 'bigint' && !ctx?.keep)
return Number(value);
return value;
}
exports
frontend/node_modules/yaml/dist/nodes/identity.js (Line 3:1 - Line 38:8), frontend/node_modules/yaml/browser/dist/nodes/identity.js (Line 1:1 - Line 36:7)
frontend/node_modules/yaml/dist/nodes/addPairToJSMap.js (Line 25:2 - Line 45:9), frontend/node_modules/yaml/browser/dist/nodes/addPairToJSMap.js (Line 23:2 - Line 43:7)
toJS(value, stringKey, ctx);
if (stringKey in map)
Object.defineProperty(map, stringKey, {
value: jsValue,
writable: true,
enumerable: true,
configurable: true
});
else
map[stringKey] = jsValue;
}
}
return map;
}
function stringifyKey(key, jsKey, ctx) {
if (jsKey === null)
return '';
// eslint-disable-next-line @typescript-eslint/no-base-to-string
if (typeof jsKey !== 'object')
return String(jsKey);
if (identity
frontend/node_modules/yaml/dist/nodes/addPairToJSMap.js (Line 46:2 - Line 57:4), frontend/node_modules/yaml/browser/dist/nodes/addPairToJSMap.js (Line 44:2 - Line 55:5)
createStringifyContext(ctx.doc, {});
strCtx.anchors = new Set();
for (const node of ctx.anchors.keys())
strCtx.anchors.add(node.anchor);
strCtx.inFlow = true;
strCtx.inStringifyKey = true;
const strKey = key.toString(strCtx);
if (!ctx.mapKeyWarned) {
let jsonStr = JSON.stringify(strKey);
if (jsonStr.length > 40)
jsonStr = jsonStr.substring(0, 36) + '..."';
log
frontend/node_modules/yaml/dist/nodes/YAMLSeq.js (Line 15:2 - Line 41:9), frontend/node_modules/yaml/browser/dist/nodes/YAMLSeq.js (Line 13:2 - Line 39:9)
SEQ, schema);
this.items = [];
}
add(value) {
this.items.push(value);
}
/**
* Removes a value from the collection.
*
* `key` must contain a representation of an integer for this to succeed.
* It may be wrapped in a `Scalar`.
*
* @returns `true` if the item was found and removed.
*/
delete(key) {
const idx = asItemIndex(key);
if (typeof idx !== 'number')
return false;
const del = this.items.splice(idx, 1);
return del.length > 0;
}
get(key, keepScalar) {
const idx = asItemIndex(key);
if (typeof idx !== 'number')
return undefined;
const it = this.items[idx];
return !keepScalar && identity
frontend/node_modules/yaml/dist/nodes/YAMLSeq.js (Line 41:2 - Line 65:9), frontend/node_modules/yaml/browser/dist/nodes/YAMLSeq.js (Line 39:2 - Line 63:9)
isScalar(it) ? it.value : it;
}
/**
* Checks if the collection includes a value with the key `key`.
*
* `key` must contain a representation of an integer for this to succeed.
* It may be wrapped in a `Scalar`.
*/
has(key) {
const idx = asItemIndex(key);
return typeof idx === 'number' && idx < this.items.length;
}
/**
* Sets a value in this collection. For `!!set`, `value` needs to be a
* boolean to add/remove the item from the set.
*
* If `key` does not contain a representation of an integer, this will throw.
* It may be wrapped in a `Scalar`.
*/
set(key, value) {
const idx = asItemIndex(key);
if (typeof idx !== 'number')
throw new Error(`Expected a valid index, not ${key}.`);
const prev = this.items[idx];
if (identity
frontend/node_modules/yaml/dist/nodes/YAMLSeq.js (Line 65:2 - Line 76:5), frontend/node_modules/yaml/browser/dist/nodes/YAMLSeq.js (Line 63:2 - Line 74:5)
isScalarValue(value))
prev.value = value;
else
this.items[idx] = value;
}
toJSON(_, ctx) {
const seq = [];
if (ctx?.onCreate)
ctx.onCreate(seq);
let i = 0;
for (const item of this.items)
seq.push(toJS
frontend/node_modules/yaml/dist/nodes/YAMLSeq.js (Line 82:2 - Line 100:11), frontend/node_modules/yaml/browser/dist/nodes/YAMLSeq.js (Line 80:2 - Line 98:11)
stringifyCollection(this, ctx, {
blockItemPrefix: '- ',
flowChars: { start: '[', end: ']' },
itemIndent: (ctx.indent || '') + ' ',
onChompKeep,
onComment
});
}
static from(schema, obj, ctx) {
const { replacer } = ctx;
const seq = new this(schema);
if (obj && Symbol.iterator in Object(obj)) {
let i = 0;
for (let it of obj) {
if (typeof replacer === 'function') {
const key = obj instanceof Set ? it : String(i++);
it = replacer.call(obj, key, it);
}
seq.items.push(createNode
frontend/node_modules/yaml/dist/nodes/YAMLMap.js (Line 27:2 - Line 43:5), frontend/node_modules/yaml/browser/dist/nodes/YAMLMap.js (Line 25:2 - Line 41:11)
MAP, schema);
this.items = [];
}
/**
* A generic collection parsing method that can be extended
* to other node classes that inherit from YAMLMap
*/
static from(schema, obj, ctx) {
const { keepUndefined, replacer } = ctx;
const map = new this(schema);
const add = (key, value) => {
if (typeof replacer === 'function')
value = replacer.call(obj, key, value);
else if (Array.isArray(replacer) && !replacer.includes(key))
return;
if (value !== undefined || keepUndefined)
map.items.push(Pair
frontend/node_modules/yaml/dist/nodes/YAMLMap.js (Line 43:2 - Line 66:9), frontend/node_modules/yaml/browser/dist/nodes/YAMLMap.js (Line 41:2 - Line 64:7)
createPair(key, value, ctx));
};
if (obj instanceof Map) {
for (const [key, value] of obj)
add(key, value);
}
else if (obj && typeof obj === 'object') {
for (const key of Object.keys(obj))
add(key, obj[key]);
}
if (typeof schema.sortMapEntries === 'function') {
map.items.sort(schema.sortMapEntries);
}
return map;
}
/**
* Adds a value to the collection.
*
* @param overwrite - If not set `true`, using a key that is already in the
* collection will throw. Otherwise, overwrites the previous value.
*/
add(pair, overwrite) {
let _pair;
if (identity
frontend/node_modules/yaml/dist/nodes/YAMLMap.js (Line 73:2 - Line 80:9), frontend/node_modules/yaml/browser/dist/nodes/YAMLMap.js (Line 71:2 - Line 78:9)
Pair(pair.key, pair.value);
const prev = findPair(this.items, _pair.key);
const sortEntries = this.schema?.sortMapEntries;
if (prev) {
if (!overwrite)
throw new Error(`Key ${_pair.key} already set`);
// For scalars, keep the old node & its comments and anchors
if (identity
frontend/node_modules/yaml/dist/nodes/YAMLMap.js (Line 80:2 - Line 106:9), frontend/node_modules/yaml/browser/dist/nodes/YAMLMap.js (Line 78:2 - Line 104:9)
isScalarValue(_pair.value))
prev.value.value = _pair.value;
else
prev.value = _pair.value;
}
else if (sortEntries) {
const i = this.items.findIndex(item => sortEntries(_pair, item) < 0);
if (i === -1)
this.items.push(_pair);
else
this.items.splice(i, 0, _pair);
}
else {
this.items.push(_pair);
}
}
delete(key) {
const it = findPair(this.items, key);
if (!it)
return false;
const del = this.items.splice(this.items.indexOf(it), 1);
return del.length > 0;
}
get(key, keepScalar) {
const it = findPair(this.items, key);
const node = it?.value;
return (!keepScalar && identity
frontend/node_modules/yaml/dist/nodes/YAMLMap.js (Line 112:2 - Line 124:15), frontend/node_modules/yaml/browser/dist/nodes/YAMLMap.js (Line 110:2 - Line 122:15)
Pair(key, value), true);
}
/**
* @param ctx - Conversion context, originally set in Document#toJS()
* @param {Class} Type - If set, forces the returned collection type
* @returns Instance of Type, Map, or Object
*/
toJSON(_, ctx, Type) {
const map = Type ? new Type() : ctx?.mapAsMap ? new Map() : {};
if (ctx?.onCreate)
ctx.onCreate(map);
for (const item of this.items)
addPairToJSMap
frontend/node_modules/yaml/dist/nodes/YAMLMap.js (Line 131:2 - Line 136:20), frontend/node_modules/yaml/browser/dist/nodes/YAMLMap.js (Line 129:2 - Line 134:20)
isPair(item))
throw new Error(`Map items must all be pairs; found ${JSON.stringify(item)} instead`);
}
if (!ctx.allNullValues && this.hasAllNullValues(false))
ctx = Object.assign({}, ctx, { allNullValues: true });
return stringifyCollection
frontend/node_modules/yaml/dist/nodes/Scalar.js (Line 14:2 - Line 26:8), frontend/node_modules/yaml/browser/dist/nodes/Scalar.js (Line 12:2 - Line 24:7)
frontend/node_modules/yaml/dist/nodes/Node.js (Line 9:2 - Line 20:9), frontend/node_modules/yaml/browser/dist/nodes/Node.js (Line 7:2 - Line 18:11)
NODE_TYPE, { value: type });
}
/** Create a copy of this node. */
clone() {
const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));
if (this.range)
copy.range = this.range.slice();
return copy;
}
/** A plain JavaScript representation of this node. */
toJS(doc, { mapAsMap, maxAliasCount, onAnchor, reviver } = {}) {
if (!identity
frontend/node_modules/yaml/dist/nodes/Node.js (Line 20:2 - Line 30:5), frontend/node_modules/yaml/browser/dist/nodes/Node.js (Line 18:2 - Line 28:5)
isDocument(doc))
throw new TypeError('A document argument is required');
const ctx = {
anchors: new Map(),
doc,
keep: true,
mapAsMap: mapAsMap === true,
mapKeyWarned: false,
maxAliasCount: typeof maxAliasCount === 'number' ? maxAliasCount : 100
};
const res = toJS
frontend/node_modules/yaml/dist/nodes/Collection.js (Line 5:2 - Line 20:11), frontend/node_modules/yaml/browser/dist/nodes/Collection.js (Line 3:12 - Line 18:11)
;
function collectionFromPath(schema, path, value) {
let v = value;
for (let i = path.length - 1; i >= 0; --i) {
const k = path[i];
if (typeof k === 'number' && Number.isInteger(k) && k >= 0) {
const a = [];
a[k] = v;
v = a;
}
else {
v = new Map([[k, v]]);
}
}
return createNode
frontend/node_modules/yaml/dist/nodes/Collection.js (Line 20:2 - Line 34:5), frontend/node_modules/yaml/browser/dist/nodes/Collection.js (Line 18:2 - Line 32:9)
createNode(v, undefined, {
aliasDuplicateObjects: false,
keepUndefined: false,
onAnchor: () => {
throw new Error('This should not happen, please report a bug.');
},
schema,
sourceObjects: new Map()
});
}
// Type guard is intentionally a little wrong so as to be more useful,
// as it does not cover untypable empty non-string iterables (e.g. []).
const isEmptyPath = (path) => path == null ||
(typeof path === 'object' && !!path[Symbol.iterator]().next().done);
class Collection extends Node
frontend/node_modules/yaml/dist/nodes/Collection.js (Line 34:2 - Line 53:9), frontend/node_modules/yaml/browser/dist/nodes/Collection.js (Line 32:2 - Line 51:7)
NodeBase {
constructor(type, schema) {
super(type);
Object.defineProperty(this, 'schema', {
value: schema,
configurable: true,
enumerable: false,
writable: true
});
}
/**
* Create a copy of this collection.
*
* @param schema - If defined, overwrites the original's schema
*/
clone(schema) {
const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));
if (schema)
copy.schema = schema;
copy.items = copy.items.map(it => identity
frontend/node_modules/yaml/dist/nodes/Collection.js (Line 53:2 - Line 69:9), frontend/node_modules/yaml/browser/dist/nodes/Collection.js (Line 51:2 - Line 67:13)
isPair(it) ? it.clone(schema) : it);
if (this.range)
copy.range = this.range.slice();
return copy;
}
/**
* Adds a value to the collection. For `!!map` and `!!omap` the value must
* be a Pair instance or a `{ key, value }` object, which may not have a key
* that already exists in the map.
*/
addIn(path, value) {
if (isEmptyPath(path))
this.add(value);
else {
const [key, ...rest] = path;
const node = this.get(key, true);
if (identity
frontend/node_modules/yaml/dist/nodes/Collection.js (Line 69:2 - Line 86:9), frontend/node_modules/yaml/browser/dist/nodes/Collection.js (Line 67:2 - Line 84:13)
isCollection(node))
node.addIn(rest, value);
else if (node === undefined && this.schema)
this.set(key, collectionFromPath(this.schema, rest, value));
else
throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);
}
}
/**
* Removes a value from the collection.
* @returns `true` if the item was found and removed.
*/
deleteIn(path) {
const [key, ...rest] = path;
if (rest.length === 0)
return this.delete(key);
const node = this.get(key, true);
if (identity
frontend/node_modules/yaml/dist/nodes/Collection.js (Line 86:2 - Line 100:9), frontend/node_modules/yaml/browser/dist/nodes/Collection.js (Line 84:2 - Line 98:9)
isCollection(node))
return node.deleteIn(rest);
else
throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);
}
/**
* Returns item at `key`, or `undefined` if not found. By default unwraps
* scalar values from their surrounding node; to disable set `keepScalar` to
* `true` (collections are always returned intact).
*/
getIn(path, keepScalar) {
const [key, ...rest] = path;
const node = this.get(key, true);
if (rest.length === 0)
return !keepScalar && identity
frontend/node_modules/yaml/dist/nodes/Collection.js (Line 111:2 - Line 126:9), frontend/node_modules/yaml/browser/dist/nodes/Collection.js (Line 109:21 - Line 124:13)
isScalar(n) &&
n.value == null &&
!n.commentBefore &&
!n.comment &&
!n.tag));
});
}
/**
* Checks if the collection includes a value with the key `key`.
*/
hasIn(path) {
const [key, ...rest] = path;
if (rest.length === 0)
return this.has(key);
const node = this.get(key, true);
return identity
frontend/node_modules/yaml/dist/nodes/Collection.js (Line 126:2 - Line 139:9), frontend/node_modules/yaml/browser/dist/nodes/Collection.js (Line 124:2 - Line 137:13)
isCollection(node) ? node.hasIn(rest) : false;
}
/**
* Sets a value in this collection. For `!!set`, `value` needs to be a
* boolean to add/remove the item from the set.
*/
setIn(path, value) {
const [key, ...rest] = path;
if (rest.length === 0) {
this.set(key, value);
}
else {
const node = this.get(key, true);
if (identity
frontend/node_modules/yaml/dist/nodes/Collection.js (Line 139:2 - Line 149:8), frontend/node_modules/yaml/browser/dist/nodes/Collection.js (Line 137:2 - Line 147:7)
isCollection(node))
node.setIn(rest, value);
else if (node === undefined && this.schema)
this.set(key, collectionFromPath(this.schema, rest, value));
else
throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);
}
}
}
exports
frontend/node_modules/yaml/dist/nodes/Alias.js (Line 11:2 - Line 30:6), frontend/node_modules/yaml/browser/dist/nodes/Alias.js (Line 9:2 - Line 28:6)
ALIAS);
this.source = source;
Object.defineProperty(this, 'tag', {
set() {
throw new Error('Alias nodes cannot have tags');
}
});
}
/**
* Resolve the value of this alias within `doc`, finding the last
* instance of the `source` anchor before this node.
*/
resolve(doc, ctx) {
let nodes;
if (ctx?.aliasResolveCache) {
nodes = ctx.aliasResolveCache;
}
else {
nodes = [];
visit
frontend/node_modules/yaml/dist/nodes/Alias.js (Line 32:2 - Line 60:5), frontend/node_modules/yaml/browser/dist/nodes/Alias.js (Line 30:2 - Line 58:5)
hasAnchor(node))
nodes.push(node);
}
});
if (ctx)
ctx.aliasResolveCache = nodes;
}
let found = undefined;
for (const node of nodes) {
if (node === this)
break;
if (node.anchor === this.source)
found = node;
}
return found;
}
toJSON(_arg, ctx) {
if (!ctx)
return { source: this.source };
const { anchors, doc, maxAliasCount } = ctx;
const source = this.resolve(doc, ctx);
if (!source) {
const msg = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;
throw new ReferenceError(msg);
}
let data = anchors.get(source);
if (!data) {
// Resolve anchors for Node.prototype.toJS()
toJS
frontend/node_modules/yaml/dist/nodes/Alias.js (Line 60:2 - Line 82:8), frontend/node_modules/yaml/browser/dist/nodes/Alias.js (Line 58:13 - Line 80:14)
toJS(source, null, ctx);
data = anchors.get(source);
}
/* istanbul ignore if */
if (!data || data.res === undefined) {
const msg = 'This should not happen: Alias anchor was not resolved?';
throw new ReferenceError(msg);
}
if (maxAliasCount >= 0) {
data.count += 1;
if (data.aliasCount === 0)
data.aliasCount = getAliasCount(doc, source, anchors);
if (data.count * data.aliasCount > maxAliasCount) {
const msg = 'Excessive alias count indicates a resource exhaustion attack';
throw new ReferenceError(msg);
}
}
return data.res;
}
toString(ctx, _onComment, _onChompKeep) {
const src = `*${this.source}`;
if (ctx) {
anchors
frontend/node_modules/yaml/dist/nodes/Alias.js (Line 82:2 - Line 94:9), frontend/node_modules/yaml/browser/dist/nodes/Alias.js (Line 80:13 - Line 92:8)
anchorIsValid(this.source);
if (ctx.options.verifyAliasOrder && !ctx.anchors.has(this.source)) {
const msg = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;
throw new Error(msg);
}
if (ctx.implicitKey)
return `${src} `;
}
return src;
}
}
function getAliasCount(doc, node, anchors) {
if (identity
frontend/node_modules/yaml/dist/nodes/Alias.js (Line 99:2 - Line 108:9), frontend/node_modules/yaml/browser/dist/nodes/Alias.js (Line 97:2 - Line 106:7)
isCollection(node)) {
let count = 0;
for (const item of node.items) {
const c = getAliasCount(doc, item, anchors);
if (c > count)
count = c;
}
return count;
}
else if (identity
frontend/node_modules/yaml/dist/doc/directives.js (Line 4:2 - Line 156:9), frontend/node_modules/yaml/browser/dist/doc/directives.js (Line 2:14 - Line 154:7)
;
const escapeChars = {
'!': '%21',
',': '%2C',
'[': '%5B',
']': '%5D',
'{': '%7B',
'}': '%7D'
};
const escapeTagName = (tn) => tn.replace(/[!,[\]{}]/g, ch => escapeChars[ch]);
class Directives {
constructor(yaml, tags) {
/**
* The directives-end/doc-start marker `---`. If `null`, a marker may still be
* included in the document's stringified representation.
*/
this.docStart = null;
/** The doc-end marker `...`. */
this.docEnd = false;
this.yaml = Object.assign({}, Directives.defaultYaml, yaml);
this.tags = Object.assign({}, Directives.defaultTags, tags);
}
clone() {
const copy = new Directives(this.yaml, this.tags);
copy.docStart = this.docStart;
return copy;
}
/**
* During parsing, get a Directives instance for the current document and
* update the stream state according to the current version's spec.
*/
atDocument() {
const res = new Directives(this.yaml, this.tags);
switch (this.yaml.version) {
case '1.1':
this.atNextDocument = true;
break;
case '1.2':
this.atNextDocument = false;
this.yaml = {
explicit: Directives.defaultYaml.explicit,
version: '1.2'
};
this.tags = Object.assign({}, Directives.defaultTags);
break;
}
return res;
}
/**
* @param onError - May be called even if the action was successful
* @returns `true` on success
*/
add(line, onError) {
if (this.atNextDocument) {
this.yaml = { explicit: Directives.defaultYaml.explicit, version: '1.1' };
this.tags = Object.assign({}, Directives.defaultTags);
this.atNextDocument = false;
}
const parts = line.trim().split(/[ \t]+/);
const name = parts.shift();
switch (name) {
case '%TAG': {
if (parts.length !== 2) {
onError(0, '%TAG directive should contain exactly two parts');
if (parts.length < 2)
return false;
}
const [handle, prefix] = parts;
this.tags[handle] = prefix;
return true;
}
case '%YAML': {
this.yaml.explicit = true;
if (parts.length !== 1) {
onError(0, '%YAML directive should contain exactly one part');
return false;
}
const [version] = parts;
if (version === '1.1' || version === '1.2') {
this.yaml.version = version;
return true;
}
else {
const isValid = /^\d+\.\d+$/.test(version);
onError(6, `Unsupported YAML version ${version}`, isValid);
return false;
}
}
default:
onError(0, `Unknown directive ${name}`, true);
return false;
}
}
/**
* Resolves a tag, matching handles to those defined in %TAG directives.
*
* @returns Resolved tag, which may also be the non-specific tag `'!'` or a
* `'!local'` tag, or `null` if unresolvable.
*/
tagName(source, onError) {
if (source === '!')
return '!'; // non-specific tag
if (source[0] !== '!') {
onError(`Not a valid tag: ${source}`);
return null;
}
if (source[1] === '<') {
const verbatim = source.slice(2, -1);
if (verbatim === '!' || verbatim === '!!') {
onError(`Verbatim tags aren't resolved, so ${source} is invalid.`);
return null;
}
if (source[source.length - 1] !== '>')
onError('Verbatim tags must end with a >');
return verbatim;
}
const [, handle, suffix] = source.match(/^(.*!)([^!]*)$/s);
if (!suffix)
onError(`The ${source} tag has no suffix`);
const prefix = this.tags[handle];
if (prefix) {
try {
return prefix + decodeURIComponent(suffix);
}
catch (error) {
onError(String(error));
return null;
}
}
if (handle === '!')
return source; // local tag
onError(`Could not resolve tag: ${source}`);
return null;
}
/**
* Given a fully resolved tag, returns its printable string form,
* taking into account current tag prefixes and defaults.
*/
tagString(tag) {
for (const [handle, prefix] of Object.entries(this.tags)) {
if (tag.startsWith(prefix))
return handle + escapeTagName(tag.substring(prefix.length));
}
return tag[0] === '!' ? tag : `!<${tag}>`;
}
toString(doc) {
const lines = this.yaml.explicit
? [`%YAML ${this.yaml.version || '1.2'}`]
: [];
const tagEntries = Object.entries(this.tags);
let tagNames;
if (doc && tagEntries.length > 0 && identity
frontend/node_modules/yaml/dist/doc/directives.js (Line 159:2 - Line 178:8), frontend/node_modules/yaml/browser/dist/doc/directives.js (Line 157:2 - Line 176:7)
frontend/node_modules/yaml/dist/doc/createNode.js (Line 5:2 - Line 19:9), frontend/node_modules/yaml/browser/dist/doc/createNode.js (Line 3:21 - Line 17:11)
;
const defaultTagPrefix = 'tag:yaml.org,2002:';
function findTagObject(value, tagName, tags) {
if (tagName) {
const match = tags.filter(t => t.tag === tagName);
const tagObj = match.find(t => !t.format) ?? match[0];
if (!tagObj)
throw new Error(`Tag ${tagName} not found`);
return tagObj;
}
return tags.find(t => t.identify?.(value) && !t.format);
}
function createNode(value, tagName, ctx) {
if (identity
frontend/node_modules/yaml/dist/doc/createNode.js (Line 24:2 - Line 44:2), frontend/node_modules/yaml/browser/dist/doc/createNode.js (Line 22:2 - Line 42:2)
MAP].createNode?.(ctx.schema, null, ctx);
map.items.push(value);
return map;
}
if (value instanceof String ||
value instanceof Number ||
value instanceof Boolean ||
(typeof BigInt !== 'undefined' && value instanceof BigInt) // not supported everywhere
) {
// https://tc39.es/ecma262/#sec-serializejsonproperty
value = value.valueOf();
}
const { aliasDuplicateObjects, onAnchor, onTagObj, schema, sourceObjects } = ctx;
// Detect duplicate references to the same object & use Alias nodes for all
// after first. The `ref` wrapper allows for circular references to resolve.
let ref = undefined;
if (aliasDuplicateObjects && value && typeof value === 'object') {
ref = sourceObjects.get(value);
if (ref) {
ref.anchor ?? (ref.anchor = onAnchor(value));
return new Alias.
frontend/node_modules/yaml/dist/doc/createNode.js (Line 44:2 - Line 60:2), frontend/node_modules/yaml/browser/dist/doc/createNode.js (Line 42:2 - Line 58:2)
Alias(ref.anchor);
}
else {
ref = { anchor: null, node: null };
sourceObjects.set(value, ref);
}
}
if (tagName?.startsWith('!!'))
tagName = defaultTagPrefix + tagName.slice(2);
let tagObj = findTagObject(value, tagName, schema.tags);
if (!tagObj) {
if (value && typeof value.toJSON === 'function') {
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
value = value.toJSON();
}
if (!value || typeof value !== 'object') {
const node = new Scalar.
frontend/node_modules/yaml/dist/doc/createNode.js (Line 70:2 - Line 80:2), frontend/node_modules/yaml/browser/dist/doc/createNode.js (Line 68:2 - Line 78:2)
frontend/node_modules/yaml/dist/doc/applyReviver.js (Line 3:1 - Line 57:8), frontend/node_modules/yaml/browser/dist/doc/applyReviver.js (Line 1:1 - Line 55:7)
/**
* Applies the JSON.parse reviver algorithm as defined in the ECMA-262 spec,
* in section 24.5.1.1 "Runtime Semantics: InternalizeJSONProperty" of the
* 2021 edition: https://tc39.es/ecma262/#sec-json.parse
*
* Includes extensions for handling Map and Set objects.
*/
function applyReviver(reviver, obj, key, val) {
if (val && typeof val === 'object') {
if (Array.isArray(val)) {
for (let i = 0, len = val.length; i < len; ++i) {
const v0 = val[i];
const v1 = applyReviver(reviver, val, String(i), v0);
// eslint-disable-next-line @typescript-eslint/no-array-delete
if (v1 === undefined)
delete val[i];
else if (v1 !== v0)
val[i] = v1;
}
}
else if (val instanceof Map) {
for (const k of Array.from(val.keys())) {
const v0 = val.get(k);
const v1 = applyReviver(reviver, val, k, v0);
if (v1 === undefined)
val.delete(k);
else if (v1 !== v0)
val.set(k, v1);
}
}
else if (val instanceof Set) {
for (const v0 of Array.from(val)) {
const v1 = applyReviver(reviver, val, v0, v0);
if (v1 === undefined)
val.delete(v0);
else if (v1 !== v0) {
val.delete(v0);
val.add(v1);
}
}
}
else {
for (const [k, v0] of Object.entries(val)) {
const v1 = applyReviver(reviver, val, k, v0);
if (v1 === undefined)
delete val[k];
else if (v1 !== v0)
val[k] = v1;
}
}
}
return reviver.call(obj, key, val);
}
exports
frontend/node_modules/yaml/dist/doc/anchors.js (Line 4:2 - Line 21:6), frontend/node_modules/yaml/browser/dist/doc/anchors.js (Line 2:14 - Line 19:6)
;
/**
* Verify that the input string is a valid anchor.
*
* Will throw on errors.
*/
function anchorIsValid(anchor) {
if (/[\x00-\x19\s,[\]{}]/.test(anchor)) {
const sa = JSON.stringify(anchor);
const msg = `Anchor must not contain whitespace or control characters: ${sa}`;
throw new Error(msg);
}
return true;
}
function anchorNames(root) {
const anchors = new Set();
visit
frontend/node_modules/yaml/dist/doc/anchors.js (Line 21:2 - Line 59:9), frontend/node_modules/yaml/browser/dist/doc/anchors.js (Line 19:5 - Line 57:9)
visit(root, {
Value(_key, node) {
if (node.anchor)
anchors.add(node.anchor);
}
});
return anchors;
}
/** Find a new anchor name with the given `prefix` and a one-indexed suffix. */
function findNewAnchor(prefix, exclude) {
for (let i = 1; true; ++i) {
const name = `${prefix}${i}`;
if (!exclude.has(name))
return name;
}
}
function createNodeAnchors(doc, prefix) {
const aliasObjects = [];
const sourceObjects = new Map();
let prevAnchors = null;
return {
onAnchor: (source) => {
aliasObjects.push(source);
prevAnchors ?? (prevAnchors = anchorNames(doc));
const anchor = findNewAnchor(prefix, prevAnchors);
prevAnchors.add(anchor);
return anchor;
},
/**
* With circular references, the source node is only resolved after all
* of its child nodes are. This is why anchors are set only after all of
* the nodes have been created.
*/
setAnchors: () => {
for (const source of aliasObjects) {
const ref = sourceObjects.get(source);
if (typeof ref === 'object' &&
ref.anchor &&
(identity
frontend/node_modules/yaml/dist/doc/Document.js (Line 25:2 - Line 52:11), frontend/node_modules/yaml/browser/dist/doc/Document.js (Line 23:2 - Line 50:11)
DOC });
let _replacer = null;
if (typeof replacer === 'function' || Array.isArray(replacer)) {
_replacer = replacer;
}
else if (options === undefined && replacer) {
options = replacer;
replacer = undefined;
}
const opt = Object.assign({
intAsBigInt: false,
keepSourceTokens: false,
logLevel: 'warn',
prettyErrors: true,
strict: true,
stringKeys: false,
uniqueKeys: true,
version: '1.2'
}, options);
this.options = opt;
let { version } = opt;
if (options?._directives) {
this.directives = options._directives.atDocument();
if (this.directives.yaml.explicit)
version = this.directives.yaml.version;
}
else
this.directives = new directives
frontend/node_modules/yaml/dist/doc/Document.js (Line 52:2 - Line 65:9), frontend/node_modules/yaml/browser/dist/doc/Document.js (Line 50:2 - Line 63:10)
Directives({ version });
this.setSchema(version, options);
// @ts-expect-error We can't really know that this matches Contents.
this.contents =
value === undefined ? null : this.createNode(value, _replacer, options);
}
/**
* Create a deep copy of this Document and its contents.
*
* Custom Node values that inherit from `Object` still refer to their original instances.
*/
clone() {
const copy = Object.create(Document.prototype, {
[identity
frontend/node_modules/yaml/dist/doc/Document.js (Line 65:2 - Line 76:9), frontend/node_modules/yaml/browser/dist/doc/Document.js (Line 63:2 - Line 74:7)
DOC }
});
copy.commentBefore = this.commentBefore;
copy.comment = this.comment;
copy.errors = this.errors.slice();
copy.warnings = this.warnings.slice();
copy.options = Object.assign({}, this.options);
if (this.directives)
copy.directives = this.directives.clone();
copy.schema = this.schema.clone();
// @ts-expect-error We can't really know that this matches Contents.
copy.contents = identity
frontend/node_modules/yaml/dist/doc/Document.js (Line 76:2 - Line 104:8), frontend/node_modules/yaml/browser/dist/doc/Document.js (Line 74:2 - Line 102:12)
isNode(this.contents)
? this.contents.clone(copy.schema)
: this.contents;
if (this.range)
copy.range = this.range.slice();
return copy;
}
/** Adds a value to the document. */
add(value) {
if (assertCollection(this.contents))
this.contents.add(value);
}
/** Adds a value to the document. */
addIn(path, value) {
if (assertCollection(this.contents))
this.contents.addIn(path, value);
}
/**
* Create a new `Alias` node, ensuring that the target `node` has the required anchor.
*
* If `node` already has an anchor, `name` is ignored.
* Otherwise, the `node.anchor` value will be set to `name`,
* or if an anchor with that name is already present in the document,
* `name` will be used as a prefix for a new unique anchor.
* If `name` is undefined, the generated anchor will use 'a' as a prefix.
*/
createAlias(node, name) {
if (!node.anchor) {
const prev = anchors
frontend/node_modules/yaml/dist/doc/Document.js (Line 109:2 - Line 129:8), frontend/node_modules/yaml/browser/dist/doc/Document.js (Line 107:2 - Line 127:18)
Alias(node.anchor);
}
createNode(value, replacer, options) {
let _replacer = undefined;
if (typeof replacer === 'function') {
value = replacer.call({ '': value }, '', value);
_replacer = replacer;
}
else if (Array.isArray(replacer)) {
const keyToStr = (v) => typeof v === 'number' || v instanceof String || v instanceof Number;
const asStr = replacer.filter(keyToStr).map(String);
if (asStr.length > 0)
replacer = replacer.concat(asStr);
_replacer = replacer;
}
else if (options === undefined && replacer) {
options = replacer;
replacer = undefined;
}
const { aliasDuplicateObjects, anchorPrefix, flow, keepUndefined, onTagObj, tag } = options ?? {};
const { onAnchor, setAnchors, sourceObjects } = anchors
frontend/node_modules/yaml/dist/doc/Document.js (Line 142:2 - Line 154:2), frontend/node_modules/yaml/browser/dist/doc/Document.js (Line 140:2 - Line 152:2)
isCollection(node))
node.flow = true;
setAnchors();
return node;
}
/**
* Convert a key and a value into a `Pair` using the current schema,
* recursively wrapping all values as `Scalar` or `Collection` nodes.
*/
createPair(key, value, options = {}) {
const k = this.createNode(key, null, options);
const v = this.createNode(value, null, options);
return new Pair.
frontend/node_modules/yaml/dist/doc/Document.js (Line 168:2 - Line 185:9), frontend/node_modules/yaml/browser/dist/doc/Document.js (Line 166:2 - Line 183:13)
isEmptyPath(path)) {
if (this.contents == null)
return false;
// @ts-expect-error Presumed impossible if Strict extends false
this.contents = null;
return true;
}
return assertCollection(this.contents)
? this.contents.deleteIn(path)
: false;
}
/**
* Returns item at `key`, or `undefined` if not found. By default unwraps
* scalar values from their surrounding node; to disable set `keepScalar` to
* `true` (collections are always returned intact).
*/
get(key, keepScalar) {
return identity
frontend/node_modules/yaml/dist/doc/Document.js (Line 241:2 - Line 263:11), frontend/node_modules/yaml/browser/dist/doc/Document.js (Line 239:2 - Line 261:11)
collectionFromPath(this.schema, Array.from(path), value);
}
else if (assertCollection(this.contents)) {
this.contents.setIn(path, value);
}
}
/**
* Change the YAML version and schema used by the document.
* A `null` version disables support for directives, explicit tags, anchors, and aliases.
* It also requires the `schema` option to be given as a `Schema` instance value.
*
* Overrides all previously set schema options.
*/
setSchema(version, options = {}) {
if (typeof version === 'number')
version = String(version);
let opt;
switch (version) {
case '1.1':
if (this.directives)
this.directives.yaml.version = '1.1';
else
this.directives = new directives
frontend/node_modules/yaml/dist/doc/Document.js (Line 263:2 - Line 271:11), frontend/node_modules/yaml/browser/dist/doc/Document.js (Line 261:2 - Line 269:11)
Directives({ version: '1.1' });
opt = { resolveKnownTags: false, schema: 'yaml-1.1' };
break;
case '1.2':
case 'next':
if (this.directives)
this.directives.yaml.version = version;
else
this.directives = new directives
frontend/node_modules/yaml/dist/doc/Document.js (Line 271:2 - Line 288:2), frontend/node_modules/yaml/browser/dist/doc/Document.js (Line 269:2 - Line 286:2)
Directives({ version });
opt = { resolveKnownTags: true, schema: 'core' };
break;
case null:
if (this.directives)
delete this.directives;
opt = null;
break;
default: {
const sv = JSON.stringify(version);
throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${sv}`);
}
}
// Not using `instanceof Schema` to allow for duck typing
if (options.schema instanceof Object)
this.schema = options.schema;
else if (opt)
this.schema = new Schema.
frontend/node_modules/yaml/dist/doc/Document.js (Line 288:2 - Line 302:5), frontend/node_modules/yaml/browser/dist/doc/Document.js (Line 286:2 - Line 300:5)
Schema(Object.assign(opt, options));
else
throw new Error(`With a null YAML version, the { schema: Schema } option is required`);
}
// json & jsonArg are only used from toJSON()
toJS({ json, jsonArg, mapAsMap, maxAliasCount, onAnchor, reviver } = {}) {
const ctx = {
anchors: new Map(),
doc: this,
keep: !json,
mapAsMap: mapAsMap === true,
mapKeyWarned: false,
maxAliasCount: typeof maxAliasCount === 'number' ? maxAliasCount : 100
};
const res = toJS
frontend/node_modules/yaml/dist/doc/Document.js (Line 302:2 - Line 307:13), frontend/node_modules/yaml/browser/dist/doc/Document.js (Line 300:2 - Line 305:13)
toJS(this.contents, jsonArg ?? '', ctx);
if (typeof onAnchor === 'function')
for (const { count, res } of ctx.anchors.values())
onAnchor(res, count);
return typeof reviver === 'function'
? applyReviver
frontend/node_modules/yaml/dist/doc/Document.js (Line 302:2 - Line 315:8), frontend/node_modules/yaml/dist/nodes/Node.js (Line 30:2 - Line 38:2)
'', ctx);
if (typeof onAnchor === 'function')
for (const { count, res } of ctx.anchors.values())
onAnchor(res, count);
return typeof reviver === 'function'
? applyReviver.applyReviver(reviver, { '': res }, '', res)
: res;
}
/**
* A JSON representation of the document `contents`.
*
* @param jsonArg Used by `JSON.stringify` to indicate the array index or
* property name.
*/
frontend/node_modules/yaml/dist/doc/Document.js (Line 307:2 - Line 328:18), frontend/node_modules/yaml/browser/dist/doc/Document.js (Line 305:2 - Line 326:18)
applyReviver(reviver, { '': res }, '', res)
: res;
}
/**
* A JSON representation of the document `contents`.
*
* @param jsonArg Used by `JSON.stringify` to indicate the array index or
* property name.
*/
toJSON(jsonArg, onAnchor) {
return this.toJS({ json: true, jsonArg, mapAsMap: false, onAnchor });
}
/** A YAML representation of the document. */
toString(options = {}) {
if (this.errors.length > 0)
throw new Error('Document with errors cannot be stringified');
if ('indent' in options &&
(!Number.isInteger(options.indent) || Number(options.indent) <= 0)) {
const s = JSON.stringify(options.indent);
throw new Error(`"indent" option must be a positive integer, not ${s}`);
}
return stringifyDocument
frontend/node_modules/yaml/dist/compose/util-map-includes.js (Line 3:2 - Line 11:9), frontend/node_modules/yaml/browser/dist/compose/util-map-includes.js (Line 1:23 - Line 9:9)
;
function mapIncludes(ctx, items, search) {
const { uniqueKeys } = ctx.options;
if (uniqueKeys === false)
return false;
const isEqual = typeof uniqueKeys === 'function'
? uniqueKeys
: (a, b) => a === b || (identity
frontend/node_modules/yaml/dist/compose/util-flow-indent-check.js (Line 3:2 - Line 10:20), frontend/node_modules/yaml/browser/dist/compose/util-flow-indent-check.js (Line 1:29 - Line 8:16)
;
function flowIndentCheck(indent, fc, onError) {
if (fc?.type === 'flow-collection') {
const end = fc.end[0];
if (end.indent === indent &&
(end.source === ']' || end.source === '}') &&
utilContainsNewline
frontend/node_modules/yaml/dist/compose/util-empty-scalar-position.js (Line 3:1 - Line 28:8), frontend/node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js (Line 1:1 - Line 26:7)
function emptyScalarPosition(offset, before, pos) {
if (before) {
pos ?? (pos = before.length);
for (let i = pos - 1; i >= 0; --i) {
let st = before[i];
switch (st.type) {
case 'space':
case 'comment':
case 'newline':
offset -= st.source.length;
continue;
}
// Technically, an empty scalar is immediately after the last non-empty
// node, but it's more useful to place it after any whitespace.
st = before[++i];
while (st?.type === 'space') {
offset += st.source.length;
st = before[++i];
}
break;
}
}
return offset;
}
exports
frontend/node_modules/yaml/dist/compose/util-contains-newline.js (Line 3:1 - Line 36:8), frontend/node_modules/yaml/browser/dist/compose/util-contains-newline.js (Line 1:1 - Line 34:7)
function containsNewline(key) {
if (!key)
return null;
switch (key.type) {
case 'alias':
case 'scalar':
case 'double-quoted-scalar':
case 'single-quoted-scalar':
if (key.source.includes('\n'))
return true;
if (key.end)
for (const st of key.end)
if (st.type === 'newline')
return true;
return false;
case 'flow-collection':
for (const it of key.items) {
for (const st of it.start)
if (st.type === 'newline')
return true;
if (it.sep)
for (const st of it.sep)
if (st.type === 'newline')
return true;
if (containsNewline(it.key) || containsNewline(it.value))
return true;
}
return false;
default:
return true;
}
}
exports
frontend/node_modules/yaml/dist/compose/resolve-props.js (Line 3:1 - Line 148:8), frontend/node_modules/yaml/browser/dist/compose/resolve-props.js (Line 1:1 - Line 146:7)
function resolveProps(tokens, { flow, indicator, next, offset, onError, parentIndent, startOnNewline }) {
let spaceBefore = false;
let atNewline = startOnNewline;
let hasSpace = startOnNewline;
let comment = '';
let commentSep = '';
let hasNewline = false;
let reqSpace = false;
let tab = null;
let anchor = null;
let tag = null;
let newlineAfterProp = null;
let comma = null;
let found = null;
let start = null;
for (const token of tokens) {
if (reqSpace) {
if (token.type !== 'space' &&
token.type !== 'newline' &&
token.type !== 'comma')
onError(token.offset, 'MISSING_CHAR', 'Tags and anchors must be separated from the next token by white space');
reqSpace = false;
}
if (tab) {
if (atNewline && token.type !== 'comment' && token.type !== 'newline') {
onError(tab, 'TAB_AS_INDENT', 'Tabs are not allowed as indentation');
}
tab = null;
}
switch (token.type) {
case 'space':
// At the doc level, tabs at line start may be parsed
// as leading white space rather than indentation.
// In a flow collection, only the parser handles indent.
if (!flow &&
(indicator !== 'doc-start' || next?.type !== 'flow-collection') &&
token.source.includes('\t')) {
tab = token;
}
hasSpace = true;
break;
case 'comment': {
if (!hasSpace)
onError(token, 'MISSING_CHAR', 'Comments must be separated from other tokens by white space characters');
const cb = token.source.substring(1) || ' ';
if (!comment)
comment = cb;
else
comment += commentSep + cb;
commentSep = '';
atNewline = false;
break;
}
case 'newline':
if (atNewline) {
if (comment)
comment += token.source;
else if (!found || indicator !== 'seq-item-ind')
spaceBefore = true;
}
else
commentSep += token.source;
atNewline = true;
hasNewline = true;
if (anchor || tag)
newlineAfterProp = token;
hasSpace = true;
break;
case 'anchor':
if (anchor)
onError(token, 'MULTIPLE_ANCHORS', 'A node can have at most one anchor');
if (token.source.endsWith(':'))
onError(token.offset + token.source.length - 1, 'BAD_ALIAS', 'Anchor ending in : is ambiguous', true);
anchor = token;
start ?? (start = token.offset);
atNewline = false;
hasSpace = false;
reqSpace = true;
break;
case 'tag': {
if (tag)
onError(token, 'MULTIPLE_TAGS', 'A node can have at most one tag');
tag = token;
start ?? (start = token.offset);
atNewline = false;
hasSpace = false;
reqSpace = true;
break;
}
case indicator:
// Could here handle preceding comments differently
if (anchor || tag)
onError(token, 'BAD_PROP_ORDER', `Anchors and tags must be after the ${token.source} indicator`);
if (found)
onError(token, 'UNEXPECTED_TOKEN', `Unexpected ${token.source} in ${flow ?? 'collection'}`);
found = token;
atNewline =
indicator === 'seq-item-ind' || indicator === 'explicit-key-ind';
hasSpace = false;
break;
case 'comma':
if (flow) {
if (comma)
onError(token, 'UNEXPECTED_TOKEN', `Unexpected , in ${flow}`);
comma = token;
atNewline = false;
hasSpace = false;
break;
}
// else fallthrough
default:
onError(token, 'UNEXPECTED_TOKEN', `Unexpected ${token.type} token`);
atNewline = false;
hasSpace = false;
}
}
const last = tokens[tokens.length - 1];
const end = last ? last.offset + last.source.length : offset;
if (reqSpace &&
next &&
next.type !== 'space' &&
next.type !== 'newline' &&
next.type !== 'comma' &&
(next.type !== 'scalar' || next.source !== '')) {
onError(next.offset, 'MISSING_CHAR', 'Tags and anchors must be separated from the next token by white space');
}
if (tab &&
((atNewline && tab.indent <= parentIndent) ||
next?.type === 'block-map' ||
next?.type === 'block-seq'))
onError(tab, 'TAB_AS_INDENT', 'Tabs are not allowed as indentation');
return {
comma,
found,
spaceBefore,
comment,
hasNewline,
anchor,
tag,
newlineAfterProp,
end,
start: start ?? end
};
}
exports
frontend/node_modules/yaml/dist/compose/resolve-flow-scalar.js (Line 4:2 - Line 13:7), frontend/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js (Line 2:19 - Line 11:6)
;
function resolveFlowScalar(scalar, strict, onError) {
const { offset, type, source, end } = scalar;
let _type;
let value;
const _onError = (rel, code, msg) => onError(offset + rel, code, msg);
switch (type) {
case 'scalar':
_type = Scalar.Scalar
frontend/node_modules/yaml/dist/compose/resolve-flow-scalar.js (Line 21:2 - Line 35:11), frontend/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js (Line 19:2 - Line 33:11)
Scalar.QUOTE_DOUBLE;
value = doubleQuotedValue(source, _onError);
break;
/* istanbul ignore next should not happen */
default:
onError(scalar, 'UNEXPECTED_TOKEN', `Expected a flow scalar value, but found: ${type}`);
return {
value: '',
type: null,
comment: '',
range: [offset, offset + source.length, offset + source.length]
};
}
const valueEnd = offset + source.length;
const re = resolveEnd
frontend/node_modules/yaml/dist/compose/resolve-flow-scalar.js (Line 35:2 - Line 225:8), frontend/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js (Line 33:2 - Line 223:7)
resolveEnd(end, valueEnd, strict, onError);
return {
value,
type: _type,
comment: re.comment,
range: [offset, valueEnd, re.offset]
};
}
function plainValue(source, onError) {
let badChar = '';
switch (source[0]) {
/* istanbul ignore next should not happen */
case '\t':
badChar = 'a tab character';
break;
case ',':
badChar = 'flow indicator character ,';
break;
case '%':
badChar = 'directive indicator character %';
break;
case '|':
case '>': {
badChar = `block scalar indicator ${source[0]}`;
break;
}
case '@':
case '`': {
badChar = `reserved character ${source[0]}`;
break;
}
}
if (badChar)
onError(0, 'BAD_SCALAR_START', `Plain value cannot start with ${badChar}`);
return foldLines(source);
}
function singleQuotedValue(source, onError) {
if (source[source.length - 1] !== "'" || source.length === 1)
onError(source.length, 'MISSING_CHAR', "Missing closing 'quote");
return foldLines(source.slice(1, -1)).replace(/''/g, "'");
}
function foldLines(source) {
/**
* The negative lookbehind here and in the `re` RegExp is to
* prevent causing a polynomial search time in certain cases.
*
* The try-catch is for Safari, which doesn't support this yet:
* https://caniuse.com/js-regexp-lookbehind
*/
let first, line;
try {
first = new RegExp('(.*?)(?<![ \t])[ \t]*\r?\n', 'sy');
line = new RegExp('[ \t]*(.*?)(?:(?<![ \t])[ \t]*)?\r?\n', 'sy');
}
catch {
first = /(.*?)[ \t]*\r?\n/sy;
line = /[ \t]*(.*?)[ \t]*\r?\n/sy;
}
let match = first.exec(source);
if (!match)
return source;
let res = match[1];
let sep = ' ';
let pos = first.lastIndex;
line.lastIndex = pos;
while ((match = line.exec(source))) {
if (match[1] === '') {
if (sep === '\n')
res += sep;
else
sep = '\n';
}
else {
res += sep + match[1];
sep = ' ';
}
pos = line.lastIndex;
}
const last = /[ \t]*(.*)/sy;
last.lastIndex = pos;
match = last.exec(source);
return res + sep + (match?.[1] ?? '');
}
function doubleQuotedValue(source, onError) {
let res = '';
for (let i = 1; i < source.length - 1; ++i) {
const ch = source[i];
if (ch === '\r' && source[i + 1] === '\n')
continue;
if (ch === '\n') {
const { fold, offset } = foldNewline(source, i);
res += fold;
i = offset;
}
else if (ch === '\\') {
let next = source[++i];
const cc = escapeCodes[next];
if (cc)
res += cc;
else if (next === '\n') {
// skip escaped newlines, but still trim the following line
next = source[i + 1];
while (next === ' ' || next === '\t')
next = source[++i + 1];
}
else if (next === '\r' && source[i + 1] === '\n') {
// skip escaped CRLF newlines, but still trim the following line
next = source[++i + 1];
while (next === ' ' || next === '\t')
next = source[++i + 1];
}
else if (next === 'x' || next === 'u' || next === 'U') {
const length = { x: 2, u: 4, U: 8 }[next];
res += parseCharCode(source, i + 1, length, onError);
i += length;
}
else {
const raw = source.substr(i - 1, 2);
onError(i - 1, 'BAD_DQ_ESCAPE', `Invalid escape sequence ${raw}`);
res += raw;
}
}
else if (ch === ' ' || ch === '\t') {
// trim trailing whitespace
const wsStart = i;
let next = source[i + 1];
while (next === ' ' || next === '\t')
next = source[++i + 1];
if (next !== '\n' && !(next === '\r' && source[i + 2] === '\n'))
res += i > wsStart ? source.slice(wsStart, i + 1) : ch;
}
else {
res += ch;
}
}
if (source[source.length - 1] !== '"' || source.length === 1)
onError(source.length, 'MISSING_CHAR', 'Missing closing "quote');
return res;
}
/**
* Fold a single newline into a space, multiple newlines to N - 1 newlines.
* Presumes `source[offset] === '\n'`
*/
function foldNewline(source, offset) {
let fold = '';
let ch = source[offset + 1];
while (ch === ' ' || ch === '\t' || ch === '\n' || ch === '\r') {
if (ch === '\r' && source[offset + 2] !== '\n')
break;
if (ch === '\n')
fold += '\n';
offset += 1;
ch = source[offset + 1];
}
if (!fold)
fold = ' ';
return { fold, offset };
}
const escapeCodes = {
'0': '\0', // null character
a: '\x07', // bell character
b: '\b', // backspace
e: '\x1b', // escape character
f: '\f', // form feed
n: '\n', // line feed
r: '\r', // carriage return
t: '\t', // horizontal tab
v: '\v', // vertical tab
N: '\u0085', // Unicode next line
_: '\u00a0', // Unicode non-breaking space
L: '\u2028', // Unicode line separator
P: '\u2029', // Unicode paragraph separator
' ': ' ',
'"': '"',
'/': '/',
'\\': '\\',
'\t': '\t'
};
function parseCharCode(source, offset, length, onError) {
const cc = source.substr(offset, length);
const ok = cc.length === length && /^[0-9a-fA-F]+$/.test(cc);
const code = ok ? parseInt(cc, 16) : NaN;
if (isNaN(code)) {
const raw = source.substr(offset - 2, length + 2);
onError(offset - 2, 'BAD_DQ_ESCAPE', `Invalid escape sequence ${raw}`);
return raw;
}
return String.fromCodePoint(code);
}
exports
frontend/node_modules/yaml/dist/compose/resolve-flow-collection.js (Line 10:2 - Line 17:2), frontend/node_modules/yaml/browser/dist/compose/resolve-flow-collection.js (Line 8:25 - Line 15:2)
frontend/node_modules/yaml/dist/compose/resolve-flow-collection.js (Line 17:2 - Line 29:13), frontend/node_modules/yaml/browser/dist/compose/resolve-flow-collection.js (Line 15:2 - Line 27:13)
YAMLSeq));
const coll = new NodeClass(ctx.schema);
coll.flow = true;
const atRoot = ctx.atRoot;
if (atRoot)
ctx.atRoot = false;
if (ctx.atKey)
ctx.atKey = false;
let offset = fc.offset + fc.start.source.length;
for (let i = 0; i < fc.items.length; ++i) {
const collItem = fc.items[i];
const { start, key, sep, value } = collItem;
const props = resolveProps
frontend/node_modules/yaml/dist/compose/resolve-flow-collection.js (Line 29:2 - Line 53:20), frontend/node_modules/yaml/browser/dist/compose/resolve-flow-collection.js (Line 27:2 - Line 51:16)
resolveProps(start, {
flow: fcName,
indicator: 'explicit-key-ind',
next: key ?? sep?.[0],
offset,
onError,
parentIndent: fc.indent,
startOnNewline: false
});
if (!props.found) {
if (!props.anchor && !props.tag && !sep && !value) {
if (i === 0 && props.comma)
onError(props.comma, 'UNEXPECTED_TOKEN', `Unexpected , in ${fcName}`);
else if (i < fc.items.length - 1)
onError(props.start, 'UNEXPECTED_TOKEN', `Unexpected empty item in ${fcName}`);
if (props.comment) {
if (coll.comment)
coll.comment += '\n' + props.comment;
else
coll.comment = props.comment;
}
offset = props.end;
continue;
}
if (!isMap && ctx.options.strict && utilContainsNewline
frontend/node_modules/yaml/dist/compose/resolve-flow-collection.js (Line 53:2 - Line 80:9), frontend/node_modules/yaml/browser/dist/compose/resolve-flow-collection.js (Line 51:2 - Line 78:7)
containsNewline(key))
onError(key, // checked by containsNewline()
'MULTILINE_IMPLICIT_KEY', 'Implicit keys of flow sequence pairs need to be on a single line');
}
if (i === 0) {
if (props.comma)
onError(props.comma, 'UNEXPECTED_TOKEN', `Unexpected , in ${fcName}`);
}
else {
if (!props.comma)
onError(props.start, 'MISSING_CHAR', `Missing , between ${fcName} items`);
if (props.comment) {
let prevItemComment = '';
loop: for (const st of start) {
switch (st.type) {
case 'comma':
case 'space':
break;
case 'comment':
prevItemComment = st.source.substring(1);
break loop;
default:
break loop;
}
}
if (prevItemComment) {
let prev = coll.items[coll.items.length - 1];
if (identity
frontend/node_modules/yaml/dist/compose/resolve-flow-collection.js (Line 80:2 - Line 113:13), frontend/node_modules/yaml/browser/dist/compose/resolve-flow-collection.js (Line 78:2 - Line 111:13)
isPair(prev))
prev = prev.value ?? prev.key;
if (prev.comment)
prev.comment += '\n' + prevItemComment;
else
prev.comment = prevItemComment;
props.comment = props.comment.substring(prevItemComment.length + 1);
}
}
}
if (!isMap && !sep && !props.found) {
// item is a value in a seq
// → key & sep are empty, start does not include ? or :
const valueNode = value
? composeNode(ctx, value, props, onError)
: composeEmptyNode(ctx, props.end, sep, null, props, onError);
coll.items.push(valueNode);
offset = valueNode.range[2];
if (isBlock(value))
onError(valueNode.range, 'BLOCK_IN_FLOW', blockMsg);
}
else {
// item is a key+value pair
// key value
ctx.atKey = true;
const keyStart = props.end;
const keyNode = key
? composeNode(ctx, key, props, onError)
: composeEmptyNode(ctx, keyStart, start, null, props, onError);
if (isBlock(key))
onError(keyNode.range, 'BLOCK_IN_FLOW', blockMsg);
ctx.atKey = false;
// value properties
const valueProps = resolveProps
frontend/node_modules/yaml/dist/compose/resolve-flow-collection.js (Line 113:2 - Line 159:2), frontend/node_modules/yaml/browser/dist/compose/resolve-flow-collection.js (Line 111:2 - Line 157:2)
resolveProps(sep ?? [], {
flow: fcName,
indicator: 'map-value-ind',
next: value,
offset: keyNode.range[2],
onError,
parentIndent: fc.indent,
startOnNewline: false
});
if (valueProps.found) {
if (!isMap && !props.found && ctx.options.strict) {
if (sep)
for (const st of sep) {
if (st === valueProps.found)
break;
if (st.type === 'newline') {
onError(st, 'MULTILINE_IMPLICIT_KEY', 'Implicit keys of flow sequence pairs need to be on a single line');
break;
}
}
if (props.start < valueProps.found.offset - 1024)
onError(valueProps.found, 'KEY_OVER_1024_CHARS', 'The : indicator must be at most 1024 chars after the start of an implicit flow sequence key');
}
}
else if (value) {
if ('source' in value && value.source && value.source[0] === ':')
onError(value, 'MISSING_CHAR', `Missing space after : in ${fcName}`);
else
onError(valueProps.start, 'MISSING_CHAR', `Missing , or : between ${fcName} items`);
}
// value value
const valueNode = value
? composeNode(ctx, value, valueProps, onError)
: valueProps.found
? composeEmptyNode(ctx, valueProps.end, sep, null, valueProps, onError)
: null;
if (valueNode) {
if (isBlock(value))
onError(valueNode.range, 'BLOCK_IN_FLOW', blockMsg);
}
else if (valueProps.comment) {
if (keyNode.comment)
keyNode.comment += '\n' + valueProps.comment;
else
keyNode.comment = valueProps.comment;
}
const pair = new Pair.
frontend/node_modules/yaml/dist/compose/resolve-flow-collection.js (Line 169:2 - Line 194:11), frontend/node_modules/yaml/browser/dist/compose/resolve-flow-collection.js (Line 167:2 - Line 192:11)
YAMLMap(ctx.schema);
map.flow = true;
map.items.push(pair);
const endRange = (valueNode ?? keyNode).range;
map.range = [keyNode.range[0], endRange[1], endRange[2]];
coll.items.push(map);
}
offset = valueNode ? valueNode.range[2] : valueProps.end;
}
}
const expectedEnd = isMap ? '}' : ']';
const [ce, ...ee] = fc.end;
let cePos = offset;
if (ce && ce.source === expectedEnd)
cePos = ce.offset + ce.source.length;
else {
const name = fcName[0].toUpperCase() + fcName.substring(1);
const msg = atRoot
? `${name} must end with a ${expectedEnd}`
: `${name} in block collection must be sufficiently indented and end with a ${expectedEnd}`;
onError(offset, atRoot ? 'MISSING_CHAR' : 'BAD_INDENT', msg);
if (ce && ce.source.length !== 1)
ee.unshift(ce);
}
if (ee.length > 0) {
const end = resolveEnd
frontend/node_modules/yaml/dist/compose/resolve-flow-collection.js (Line 194:2 - Line 209:8), frontend/node_modules/yaml/browser/dist/compose/resolve-flow-collection.js (Line 192:2 - Line 207:7)
frontend/node_modules/yaml/dist/compose/resolve-end.js (Line 3:1 - Line 39:8), frontend/node_modules/yaml/browser/dist/compose/resolve-end.js (Line 1:1 - Line 37:7)
function resolveEnd(end, offset, reqSpace, onError) {
let comment = '';
if (end) {
let hasSpace = false;
let sep = '';
for (const token of end) {
const { source, type } = token;
switch (type) {
case 'space':
hasSpace = true;
break;
case 'comment': {
if (reqSpace && !hasSpace)
onError(token, 'MISSING_CHAR', 'Comments must be separated from other tokens by white space characters');
const cb = source.substring(1) || ' ';
if (!comment)
comment = cb;
else
comment += sep + cb;
sep = '';
break;
}
case 'newline':
if (comment)
sep += source;
hasSpace = true;
break;
default:
onError(token, 'UNEXPECTED_TOKEN', `Unexpected ${type} at node end`);
}
offset += source.length;
}
}
return { comment, offset };
}
exports
frontend/node_modules/yaml/dist/compose/resolve-block-seq.js (Line 8:2 - Line 17:13), frontend/node_modules/yaml/browser/dist/compose/resolve-block-seq.js (Line 6:2 - Line 15:13)
YAMLSeq;
const seq = new NodeClass(ctx.schema);
if (ctx.atRoot)
ctx.atRoot = false;
if (ctx.atKey)
ctx.atKey = false;
let offset = bs.offset;
let commentEnd = null;
for (const { start, value } of bs.items) {
const props = resolveProps
frontend/node_modules/yaml/dist/compose/resolve-block-seq.js (Line 17:2 - Line 43:20), frontend/node_modules/yaml/browser/dist/compose/resolve-block-seq.js (Line 15:2 - Line 41:16)
resolveProps(start, {
indicator: 'seq-item-ind',
next: value,
offset,
onError,
parentIndent: bs.indent,
startOnNewline: true
});
if (!props.found) {
if (props.anchor || props.tag || value) {
if (value && value.type === 'block-seq')
onError(props.end, 'BAD_INDENT', 'All sequence items must start at the same column');
else
onError(offset, 'MISSING_CHAR', 'Sequence item without - indicator');
}
else {
commentEnd = props.end;
if (props.comment)
seq.comment = props.comment;
continue;
}
}
const node = value
? composeNode(ctx, value, props, onError)
: composeEmptyNode(ctx, props.end, start, null, props, onError);
if (ctx.schema.compat)
utilFlowIndentCheck
frontend/node_modules/yaml/dist/compose/resolve-block-seq.js (Line 43:2 - Line 51:8), frontend/node_modules/yaml/browser/dist/compose/resolve-block-seq.js (Line 41:13 - Line 49:7)
frontend/node_modules/yaml/dist/compose/resolve-block-scalar.js (Line 10:2 - Line 83:7), frontend/node_modules/yaml/browser/dist/compose/resolve-block-scalar.js (Line 8:2 - Line 81:14)
Scalar.BLOCK_LITERAL;
const lines = scalar.source ? splitLines(scalar.source) : [];
// determine the end of content & start of chomping
let chompStart = lines.length;
for (let i = lines.length - 1; i >= 0; --i) {
const content = lines[i][1];
if (content === '' || content === '\r')
chompStart = i;
else
break;
}
// shortcut for empty contents
if (chompStart === 0) {
const value = header.chomp === '+' && lines.length > 0
? '\n'.repeat(Math.max(1, lines.length - 1))
: '';
let end = start + header.length;
if (scalar.source)
end += scalar.source.length;
return { value, type, comment: header.comment, range: [start, end, end] };
}
// find the indentation level to trim from start
let trimIndent = scalar.indent + header.indent;
let offset = scalar.offset + header.length;
let contentStart = 0;
for (let i = 0; i < chompStart; ++i) {
const [indent, content] = lines[i];
if (content === '' || content === '\r') {
if (header.indent === 0 && indent.length > trimIndent)
trimIndent = indent.length;
}
else {
if (indent.length < trimIndent) {
const message = 'Block scalars with more-indented leading empty lines must use an explicit indentation indicator';
onError(offset + indent.length, 'MISSING_CHAR', message);
}
if (header.indent === 0)
trimIndent = indent.length;
contentStart = i;
if (trimIndent === 0 && !ctx.atRoot) {
const message = 'Block scalar values in collections must be indented';
onError(offset, 'BAD_INDENT', message);
}
break;
}
offset += indent.length + content.length + 1;
}
// include trailing more-indented empty lines in content
for (let i = lines.length - 1; i >= chompStart; --i) {
if (lines[i][0].length > trimIndent)
chompStart = i + 1;
}
let value = '';
let sep = '';
let prevMoreIndented = false;
// leading whitespace is kept intact
for (let i = 0; i < contentStart; ++i)
value += lines[i][0].slice(trimIndent) + '\n';
for (let i = contentStart; i < chompStart; ++i) {
let [indent, content] = lines[i];
offset += indent.length + content.length + 1;
const crlf = content[content.length - 1] === '\r';
if (crlf)
content = content.slice(0, -1);
/* istanbul ignore if already caught in lexer */
if (content && indent.length < trimIndent) {
const src = header.indent
? 'explicit indentation indicator'
: 'first line';
const message = `Block scalar lines must not be less indented than their ${src}`;
onError(offset - content.length - (crlf ? 2 : 1), 'BAD_INDENT', message);
indent = '';
}
if (type === Scalar.Scalar
frontend/node_modules/yaml/dist/compose/resolve-block-scalar.js (Line 83:2 - Line 200:8), frontend/node_modules/yaml/browser/dist/compose/resolve-block-scalar.js (Line 81:2 - Line 198:7)
Scalar.BLOCK_LITERAL) {
value += sep + indent.slice(trimIndent) + content;
sep = '\n';
}
else if (indent.length > trimIndent || content[0] === '\t') {
// more-indented content within a folded block
if (sep === ' ')
sep = '\n';
else if (!prevMoreIndented && sep === '\n')
sep = '\n\n';
value += sep + indent.slice(trimIndent) + content;
sep = '\n';
prevMoreIndented = true;
}
else if (content === '') {
// empty line
if (sep === '\n')
value += '\n';
else
sep = '\n';
}
else {
value += sep + content;
sep = ' ';
prevMoreIndented = false;
}
}
switch (header.chomp) {
case '-':
break;
case '+':
for (let i = chompStart; i < lines.length; ++i)
value += '\n' + lines[i][0].slice(trimIndent);
if (value[value.length - 1] !== '\n')
value += '\n';
break;
default:
value += '\n';
}
const end = start + header.length + scalar.source.length;
return { value, type, comment: header.comment, range: [start, end, end] };
}
function parseBlockScalarHeader({ offset, props }, strict, onError) {
/* istanbul ignore if should not happen */
if (props[0].type !== 'block-scalar-header') {
onError(props[0], 'IMPOSSIBLE', 'Block scalar header not found');
return null;
}
const { source } = props[0];
const mode = source[0];
let indent = 0;
let chomp = '';
let error = -1;
for (let i = 1; i < source.length; ++i) {
const ch = source[i];
if (!chomp && (ch === '-' || ch === '+'))
chomp = ch;
else {
const n = Number(ch);
if (!indent && n)
indent = n;
else if (error === -1)
error = offset + i;
}
}
if (error !== -1)
onError(error, 'UNEXPECTED_TOKEN', `Block scalar header includes extra characters: ${source}`);
let hasSpace = false;
let comment = '';
let length = source.length;
for (let i = 1; i < props.length; ++i) {
const token = props[i];
switch (token.type) {
case 'space':
hasSpace = true;
// fallthrough
case 'newline':
length += token.source.length;
break;
case 'comment':
if (strict && !hasSpace) {
const message = 'Comments must be separated from other tokens by white space characters';
onError(token, 'MISSING_CHAR', message);
}
length += token.source.length;
comment = token.source.substring(1);
break;
case 'error':
onError(token, 'UNEXPECTED_TOKEN', token.message);
length += token.source.length;
break;
/* istanbul ignore next should not happen */
default: {
const message = `Unexpected token in block scalar header: ${token.type}`;
onError(token, 'UNEXPECTED_TOKEN', message);
const ts = token.source;
if (ts && typeof ts === 'string')
length += ts.length;
}
}
}
return { mode, indent, chomp, comment, length };
}
/** @returns Array of lines split up as `[indent, content]` */
function splitLines(source) {
const split = source.split(/\n( *)/);
const first = split[0];
const m = first.match(/^( *)/);
const line0 = m?.[1]
? [m[1], first.slice(m[1].length)]
: ['', first];
const lines = [line0];
for (let i = 1; i < split.length; i += 2)
lines.push([split[i], split[i + 1]]);
return lines;
}
exports
frontend/node_modules/yaml/dist/compose/resolve-block-map.js (Line 12:2 - Line 21:13), frontend/node_modules/yaml/browser/dist/compose/resolve-block-map.js (Line 10:2 - Line 19:13)
YAMLMap;
const map = new NodeClass(ctx.schema);
if (ctx.atRoot)
ctx.atRoot = false;
let offset = bm.offset;
let commentEnd = null;
for (const collItem of bm.items) {
const { start, key, sep, value } = collItem;
// key properties
const keyProps = resolveProps
frontend/node_modules/yaml/dist/compose/resolve-block-map.js (Line 21:2 - Line 47:20), frontend/node_modules/yaml/browser/dist/compose/resolve-block-map.js (Line 19:2 - Line 45:16)
resolveProps(start, {
indicator: 'explicit-key-ind',
next: key ?? sep?.[0],
offset,
onError,
parentIndent: bm.indent,
startOnNewline: true
});
const implicitKey = !keyProps.found;
if (implicitKey) {
if (key) {
if (key.type === 'block-seq')
onError(offset, 'BLOCK_AS_IMPLICIT_KEY', 'A block sequence may not be used as an implicit map key');
else if ('indent' in key && key.indent !== bm.indent)
onError(offset, 'BAD_INDENT', startColMsg);
}
if (!keyProps.anchor && !keyProps.tag && !sep) {
commentEnd = keyProps.end;
if (keyProps.comment) {
if (map.comment)
map.comment += '\n' + keyProps.comment;
else
map.comment = keyProps.comment;
}
continue;
}
if (keyProps.newlineAfterProp || utilContainsNewline
frontend/node_modules/yaml/dist/compose/resolve-block-map.js (Line 47:2 - Line 61:20), frontend/node_modules/yaml/browser/dist/compose/resolve-block-map.js (Line 45:2 - Line 59:16)
containsNewline(key)) {
onError(key ?? start[start.length - 1], 'MULTILINE_IMPLICIT_KEY', 'Implicit keys need to be on a single line');
}
}
else if (keyProps.found?.indent !== bm.indent) {
onError(offset, 'BAD_INDENT', startColMsg);
}
// key value
ctx.atKey = true;
const keyStart = keyProps.end;
const keyNode = key
? composeNode(ctx, key, keyProps, onError)
: composeEmptyNode(ctx, keyStart, start, null, keyProps, onError);
if (ctx.schema.compat)
utilFlowIndentCheck
frontend/node_modules/yaml/dist/compose/resolve-block-map.js (Line 66:2 - Line 88:20), frontend/node_modules/yaml/browser/dist/compose/resolve-block-map.js (Line 64:2 - Line 86:16)
resolveProps(sep ?? [], {
indicator: 'map-value-ind',
next: value,
offset: keyNode.range[2],
onError,
parentIndent: bm.indent,
startOnNewline: !key || key.type === 'block-scalar'
});
offset = valueProps.end;
if (valueProps.found) {
if (implicitKey) {
if (value?.type === 'block-map' && !valueProps.hasNewline)
onError(offset, 'BLOCK_AS_IMPLICIT_KEY', 'Nested mappings are not allowed in compact mappings');
if (ctx.options.strict &&
keyProps.start < valueProps.found.offset - 1024)
onError(keyNode.range, 'KEY_OVER_1024_CHARS', 'The : indicator must be at most 1024 chars after the start of an implicit block mapping key');
}
// value value
const valueNode = value
? composeNode(ctx, value, valueProps, onError)
: composeEmptyNode(ctx, offset, sep, null, valueProps, onError);
if (ctx.schema.compat)
utilFlowIndentCheck
frontend/node_modules/yaml/dist/compose/resolve-block-map.js (Line 90:2 - Line 105:2), frontend/node_modules/yaml/browser/dist/compose/resolve-block-map.js (Line 88:2 - Line 103:2)
Pair(keyNode, valueNode);
if (ctx.options.keepSourceTokens)
pair.srcToken = collItem;
map.items.push(pair);
}
else {
// key with no value
if (implicitKey)
onError(keyNode.range, 'MISSING_CHAR', 'Implicit map keys need to be followed by map values');
if (valueProps.comment) {
if (keyNode.comment)
keyNode.comment += '\n' + valueProps.comment;
else
keyNode.comment = valueProps.comment;
}
const pair = new Pair.
frontend/node_modules/yaml/dist/compose/resolve-block-map.js (Line 105:2 - Line 117:8), frontend/node_modules/yaml/browser/dist/compose/resolve-block-map.js (Line 103:2 - Line 115:7)
frontend/node_modules/yaml/dist/compose/composer.js (Line 89:2 - Line 137:3), frontend/node_modules/yaml/browser/dist/compose/composer.js (Line 86:2 - Line 134:7)
isPair(it))
it = it.key;
const cb = it.commentBefore;
it.commentBefore = cb ? `${comment}\n${cb}` : comment;
}
else {
const cb = dc.commentBefore;
dc.commentBefore = cb ? `${comment}\n${cb}` : comment;
}
}
if (afterDoc) {
Array.prototype.push.apply(doc.errors, this.errors);
Array.prototype.push.apply(doc.warnings, this.warnings);
}
else {
doc.errors = this.errors;
doc.warnings = this.warnings;
}
this.prelude = [];
this.errors = [];
this.warnings = [];
}
/**
* Current stream status information.
*
* Mostly useful at the end of input for an empty stream.
*/
streamInfo() {
return {
comment: parsePrelude(this.prelude).comment,
directives: this.directives,
errors: this.errors,
warnings: this.warnings
};
}
/**
* Compose tokens into documents.
*
* @param forceDoc - If the stream contains no document, still emit a final document including any comments and directives that would be applied to a subsequent document.
* @param endOffset - Should be set if `forceDoc` is also set, to set the document range end and to indicate errors correctly.
*/
*compose(tokens, forceDoc = false, endOffset = -1) {
for (const token of tokens)
yield* this.next(token);
yield* this.end(forceDoc, endOffset);
}
/** Advance the composer by one CST token. */
*next(token) {
if
frontend/node_modules/yaml/dist/compose/composer.js (Line 139:9 - Line 150:11), frontend/node_modules/yaml/browser/dist/compose/composer.js (Line 134:9 - Line 145:11)
frontend/node_modules/yaml/dist/compose/composer.js (Line 195:2 - Line 212:2), frontend/node_modules/yaml/browser/dist/compose/composer.js (Line 190:2 - Line 207:2)
YAMLParseError(getErrorPos(token), 'UNEXPECTED_TOKEN', `Unsupported token ${token.type}`));
}
}
/**
* Call at end of input to yield any remaining document.
*
* @param forceDoc - If the stream contains no document, still emit a final document including any comments and directives that would be applied to a subsequent document.
* @param endOffset - Should be set if `forceDoc` is also set, to set the document range end and to indicate errors correctly.
*/
*end(forceDoc = false, endOffset = -1) {
if (this.doc) {
this.decorate(this.doc, true);
yield this.doc;
this.doc = null;
}
else if (forceDoc) {
const opts = Object.assign({ _directives: this.directives }, this.options);
const doc = new Document.
frontend/node_modules/yaml/dist/compose/composer.js (Line 212:2 - Line 222:8), frontend/node_modules/yaml/browser/dist/compose/composer.js (Line 207:2 - Line 217:7)
frontend/node_modules/yaml/dist/compose/compose-scalar.js (Line 11:2 - Line 17:9), frontend/node_modules/yaml/browser/dist/compose/compose-scalar.js (Line 9:2 - Line 15:7)
resolveFlowScalar(token, ctx.options.strict, onError);
const tagName = tagToken
? ctx.directives.tagName(tagToken.source, msg => onError(tagToken, 'TAG_RESOLVE_FAILED', msg))
: null;
let tag;
if (ctx.options.stringKeys && ctx.atKey) {
tag = ctx.schema[identity
frontend/node_modules/yaml/dist/compose/compose-scalar.js (Line 17:2 - Line 24:9), frontend/node_modules/yaml/browser/dist/compose/compose-scalar.js (Line 15:2 - Line 22:7)
SCALAR];
}
else if (tagName)
tag = findScalarTagByName(ctx.schema, value, tagName, tagToken, onError);
else if (token.type === 'scalar')
tag = findScalarTagByTest(ctx, value, token, onError);
else
tag = ctx.schema[identity
frontend/node_modules/yaml/dist/compose/compose-scalar.js (Line 33:2 - Line 49:9), frontend/node_modules/yaml/browser/dist/compose/compose-scalar.js (Line 31:2 - Line 47:7)
Scalar(value);
}
scalar.range = range;
scalar.source = value;
if (type)
scalar.type = type;
if (tagName)
scalar.tag = tagName;
if (tag.format)
scalar.format = tag.format;
if (comment)
scalar.comment = comment;
return scalar;
}
function findScalarTagByName(schema, value, tagName, tagToken, onError) {
if (tagName === '!')
return schema[identity
frontend/node_modules/yaml/dist/compose/compose-scalar.js (Line 49:2 - Line 70:9), frontend/node_modules/yaml/browser/dist/compose/compose-scalar.js (Line 47:2 - Line 68:7)
SCALAR]; // non-specific tag
const matchWithTest = [];
for (const tag of schema.tags) {
if (!tag.collection && tag.tag === tagName) {
if (tag.default && tag.test)
matchWithTest.push(tag);
else
return tag;
}
}
for (const tag of matchWithTest)
if (tag.test?.test(value))
return tag;
const kt = schema.knownTags[tagName];
if (kt && !kt.collection) {
// Ensure that the known tag is available for stringifying,
// but does not get used by default.
schema.tags.push(Object.assign({}, kt, { default: false, test: undefined }));
return kt;
}
onError(tagToken, 'TAG_RESOLVE_FAILED', `Unresolved tag: ${tagName}`, tagName !== 'tag:yaml.org,2002:str');
return schema[identity
frontend/node_modules/yaml/dist/compose/compose-scalar.js (Line 77:2 - Line 88:8), frontend/node_modules/yaml/browser/dist/compose/compose-scalar.js (Line 75:2 - Line 86:7)
SCALAR];
if (tag.tag !== compat.tag) {
const ts = directives.tagString(tag.tag);
const cs = directives.tagString(compat.tag);
const msg = `Value may be parsed as either ${ts} or ${cs}`;
onError(token, 'TAG_RESOLVE_FAILED', msg, true);
}
}
return tag;
}
exports
frontend/node_modules/yaml/dist/compose/compose-node.js (Line 8:2 - Line 26:14), frontend/node_modules/yaml/browser/dist/compose/compose-node.js (Line 6:34 - Line 24:14)
;
const CN = { composeNode, composeEmptyNode };
function composeNode(ctx, token, props, onError) {
const atKey = ctx.atKey;
const { spaceBefore, comment, anchor, tag } = props;
let node;
let isSrcToken = true;
switch (token.type) {
case 'alias':
node = composeAlias(ctx, token, onError);
if (anchor || tag)
onError(token, 'ALIAS_PROPS', 'An alias node must not specify any properties');
break;
case 'scalar':
case 'single-quoted-scalar':
case 'double-quoted-scalar':
case 'block-scalar':
node = composeScalar
frontend/node_modules/yaml/dist/compose/compose-node.js (Line 33:2 - Line 50:9), frontend/node_modules/yaml/browser/dist/compose/compose-node.js (Line 31:2 - Line 48:9)
frontend/node_modules/tailwindcss/src/util/normalizeConfig.js (Line 72:6 - Line 87:2), frontend/node_modules/tailwindcss/src/util/normalizeConfig.js (Line 41:8 - Line 56:2)
.every((path) => {
// `path` can be a string
if (typeof path === 'string') return true
// `path` can be an object { raw: string, extension?: string }
// `raw` must be a string
if (typeof path?.raw !== 'string') return false
// `extension` (if provided) should also be a string
if (path?.extension && typeof path?.extension !== 'string') {
return false
}
return true
})
)
frontend/node_modules/tailwindcss/src/lib/generateRules.js (Line 629:9 - Line 635:3), frontend/node_modules/tailwindcss/src/lib/generateRules.js (Line 620:11 - Line 625:2)
let [rules, options] = parseRules(ruleSet, context.postCssNodeCache)
for (let rule of rules) {
matchesPerPlugin.push([{ ...sort, options: { ...sort.options, ...options } }, rule])
}
}
if
frontend/node_modules/tailwindcss/src/lib/expandApplyAtRules.js (Line 370:6 - Line 381:2), frontend/node_modules/tailwindcss/src/util/formatVariantSelector.js (Line 96:4 - Line 107:4)
frontend/node_modules/tailwindcss/lib/util/resolveConfig.js (Line 118:1 - Line 123:2), frontend/node_modules/tailwindcss/src/util/resolveConfig.js (Line 117:1 - Line 124:2)
}
function mergeExtensions({ extend , ...theme }) {
return mergeWith(theme, extend, (themeValue, extensions)=>{
// The `extend` property is an array, so we need to check if it contains any functions
if (!isFunction(themeValue) && !extensions.some(isFunction)) {
return mergeWith({}, themeValue, ...extensions, mergeExtensionCustomizer);
frontend/node_modules/tailwindcss/lib/util/pluginUtils.js (Line 1:1 - Line 12:17), frontend/node_modules/tailwindcss/lib/cli/build/utils.js (Line 2:1 - Line 13:16)
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
updateAllClasses
frontend/node_modules/tailwindcss/lib/util/parseBoxShadowValue.js (Line 1:1 - Line 12:20), frontend/node_modules/tailwindcss/lib/cli/build/utils.js (Line 2:1 - Line 13:16)
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
parseBoxShadowValue
frontend/node_modules/tailwindcss/lib/util/normalizeScreens.js (Line 25:2 - Line 36:17), frontend/node_modules/tailwindcss/lib/cli/build/utils.js (Line 2:1 - Line 13:16)
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
normalizeScreens
frontend/node_modules/tailwindcss/lib/util/normalizeConfig.js (Line 108:6 - Line 119:2), frontend/node_modules/tailwindcss/lib/util/normalizeConfig.js (Line 82:8 - Line 93:2)
.every((path)=>{
// `path` can be a string
if (typeof path === "string") return true;
// `path` can be an object { raw: string, extension?: string }
// `raw` must be a string
if (typeof (path === null || path === void 0 ? void 0 : path.raw) !== "string") return false;
// `extension` (if provided) should also be a string
if ((path === null || path === void 0 ? void 0 : path.extension) && typeof (path === null || path === void 0 ? void 0 : path.extension) !== "string") {
return false;
}
return true;
}))
frontend/node_modules/tailwindcss/lib/util/nameClass.js (Line 1:1 - Line 12:8), frontend/node_modules/tailwindcss/lib/cli/build/utils.js (Line 2:1 - Line 13:16)
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
asClass
frontend/node_modules/tailwindcss/lib/util/log.js (Line 1:1 - Line 12:4), frontend/node_modules/tailwindcss/lib/cli/build/utils.js (Line 2:1 - Line 13:16)
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
dim
frontend/node_modules/tailwindcss/lib/util/formatVariantSelector.js (Line 1:1 - Line 12:22), frontend/node_modules/tailwindcss/lib/cli/build/utils.js (Line 2:1 - Line 13:16)
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
formatVariantSelector
frontend/node_modules/tailwindcss/lib/util/dataTypes.js (Line 1:1 - Line 12:10), frontend/node_modules/tailwindcss/lib/cli/build/utils.js (Line 2:1 - Line 13:16)
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
normalize
frontend/node_modules/tailwindcss/lib/util/createUtilityPlugin.js (Line 32:13 - Line 39:2), frontend/node_modules/tailwindcss/src/util/createUtilityPlugin.js (Line 13:7 - Line 20:2)
frontend/node_modules/tailwindcss/lib/lib/offsets.js (Line 110:2 - Line 120:2), frontend/node_modules/tailwindcss/src/lib/offsets.js (Line 142:2 - Line 149:2)
? rule.parentLayer : rule.layer,
variants: rule.variants | variant.variants,
options: options.sort ? [].concat(options, rule.options) : rule.options,
// TODO: Technically this is wrong. We should be handling parallel index on a per variant basis.
// We'll take the max of all the parallel indexes for now.
// @ts-ignore
parallelIndex: max([
rule.parallelIndex,
variant.parallelIndex
])
}
frontend/node_modules/tailwindcss/lib/lib/load-config.js (Line 1:1 - Line 12:14), frontend/node_modules/tailwindcss/lib/cli/build/utils.js (Line 2:1 - Line 13:16)
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
useCustomJiti
frontend/node_modules/tailwindcss/lib/lib/getModuleDependencies.js (Line 8:22 - Line 18:4), frontend/node_modules/tailwindcss/lib/cli/init/index.js (Line 9:5 - Line 19:9)
frontend/node_modules/tailwindcss/lib/lib/generateRules.js (Line 1:1 - Line 12:25), frontend/node_modules/tailwindcss/lib/cli/build/utils.js (Line 2:1 - Line 13:16)
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
getClassNameFromSelector
frontend/node_modules/tailwindcss/lib/lib/generateRules.js (Line 43:1 - Line 82:4), frontend/node_modules/tailwindcss/lib/util/normalizeConfig.js (Line 13:1 - Line 52:9)
function _getRequireWildcardCache(nodeInterop) {
if (typeof WeakMap !== "function") return null;
var cacheBabelInterop = new WeakMap();
var cacheNodeInterop = new WeakMap();
return (_getRequireWildcardCache = function(nodeInterop) {
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
})(nodeInterop);
}
function _interop_require_wildcard(obj, nodeInterop) {
if (!nodeInterop && obj && obj.__esModule) {
return obj;
}
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
return {
default: obj
};
}
var cache = _getRequireWildcardCache(nodeInterop);
if (cache && cache.has(obj)) {
return cache.get(obj);
}
var newObj = {};
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
for(var key in obj){
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
if (desc && (desc.get || desc.set)) {
Object.defineProperty(newObj, key, desc);
} else {
newObj[key] = obj[key];
}
}
}
newObj.default = obj;
if (cache) {
cache.set(obj, newObj);
}
return newObj;
}
let
frontend/node_modules/tailwindcss/lib/lib/generateRules.js (Line 342:17 - Line 356:2), frontend/node_modules/tailwindcss/src/lib/generateRules.js (Line 319:9 - Line 333:2)
// It can happen that a list of format strings is returned from within the function. In that
// case, we have to process them as well. We can use the existing `variantSort`.
if (Array.isArray(ruleWithVariant)) {
for (let [idx, variantFunction] of ruleWithVariant.entries()){
// This is a little bit scary since we are pushing to an array of items that we are
// currently looping over. However, you can also think of it like a processing queue
// where you keep handling jobs until everything is done and each job can queue more
// jobs if needed.
variantFunctionTuples.push([
context.offsets.applyParallelOffset(variantSort, idx),
variantFunction,
// If the clone has been modified we have to pass that back
// though so each rule can use the modified container
clone.clone()
]
frontend/node_modules/tailwindcss/lib/lib/generateRules.js (Line 640:17 - Line 654:3), frontend/node_modules/tailwindcss/lib/lib/generateRules.js (Line 624:21 - Line 638:2)
let [rules, options] = parseRules(ruleSet, context.postCssNodeCache);
for (let rule of rules){
matchesPerPlugin.push([
{
...sort,
options: {
...sort.options,
...options
}
},
rule
]);
}
}
if
frontend/node_modules/tailwindcss/lib/lib/generateRules.js (Line 662:13 - Line 669:6), frontend/node_modules/tailwindcss/src/lib/generateRules.js (Line 650:7 - Line 660:6)
}
}
if (isArbitraryValue(modifier)) {
if (matches.length > 1) {
// Partition plugins in 2 categories so that we can start searching in the plugins that
// don't have `any` as a type first.
let [withAny, withoutAny] = matches.reduce((group, plugin)=>{
let hasAnyType = plugin.some(([{ options }])=>options.types.some(({ type })=>type === "any"
frontend/node_modules/tailwindcss/lib/lib/findAtConfigPath.js (Line 8:17 - Line 18:17), frontend/node_modules/tailwindcss/lib/cli/init/index.js (Line 9:5 - Line 19:6)
frontend/node_modules/tailwindcss/lib/lib/expandTailwindAtRules.js (Line 17:21 - Line 62:4), frontend/node_modules/tailwindcss/lib/lib/generateRules.js (Line 37:33 - Line 82:16)
);
function _interop_require_default(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
function _getRequireWildcardCache(nodeInterop) {
if (typeof WeakMap !== "function") return null;
var cacheBabelInterop = new WeakMap();
var cacheNodeInterop = new WeakMap();
return (_getRequireWildcardCache = function(nodeInterop) {
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
})(nodeInterop);
}
function _interop_require_wildcard(obj, nodeInterop) {
if (!nodeInterop && obj && obj.__esModule) {
return obj;
}
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
return {
default: obj
};
}
var cache = _getRequireWildcardCache(nodeInterop);
if (cache && cache.has(obj)) {
return cache.get(obj);
}
var newObj = {};
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
for(var key in obj){
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
if (desc && (desc.get || desc.set)) {
Object.defineProperty(newObj, key, desc);
} else {
newObj[key] = obj[key];
}
}
}
newObj.default = obj;
if (cache) {
cache.set(obj, newObj);
}
return newObj;
}
let env
frontend/node_modules/tailwindcss/lib/lib/expandApplyAtRules.js (Line 175:9 - Line 180:2), frontend/node_modules/tailwindcss/src/lib/expandApplyAtRules.js (Line 190:5 - Line 197:9)
}
if (context.classCache.has(candidate)) {
context.applyClassCache.set(candidate, context.classCache.get(candidate).map(([meta, rule])=>[
meta,
rule.clone()
]));
frontend/node_modules/tailwindcss/lib/lib/expandApplyAtRules.js (Line 209:1 - Line 220:2), frontend/node_modules/tailwindcss/src/lib/expandApplyAtRules.js (Line 234:1 - Line 246:2)
}
/**
* Take a series of multiple caches and merge
* them so they act like one large cache
*
* @param {ApplyCache[]} caches
* @returns {ApplyCache}
*/ function combineCaches(caches) {
return {
get: (name)=>caches.flatMap((cache)=>cache.get(name) || []),
has: (name)=>caches.some((cache)=>cache.has(name))
}
frontend/node_modules/tailwindcss/lib/lib/expandApplyAtRules.js (Line 332:6 - Line 342:2), frontend/node_modules/tailwindcss/lib/util/formatVariantSelector.js (Line 98:4 - Line 108:4)
frontend/node_modules/tailwindcss/lib/lib/expandApplyAtRules.js (Line 455:17 - Line 489:2), frontend/node_modules/tailwindcss/src/lib/expandApplyAtRules.js (Line 520:9 - Line 555:7)
if (canRewriteSelector) {
root.walkRules((rule)=>{
// Let's imagine you have the following structure:
//
// .foo {
// @apply bar;
// }
//
// @supports (a: b) {
// .bar {
// color: blue
// }
//
// .something-unrelated {}
// }
//
// In this case we want to apply `.bar` but it happens to be in
// an atrule node. We clone that node instead of the nested one
// because we still want that @supports rule to be there once we
// applied everything.
//
// However it happens to be that the `.something-unrelated` is
// also in that same shared @supports atrule. This is not good,
// and this should not be there. The good part is that this is
// a clone already and it can be safely removed. The question is
// how do we know we can remove it. Basically what we can do is
// match it against the applyCandidate that you want to apply. If
// it doesn't match the we can safely delete it.
//
// If we didn't do this, then the `replaceSelector` function
// would have replaced this with something that didn't exist and
// therefore it removed the selector altogether. In this specific
// case it would result in `{}` instead of `.something-unrelated {}`
if (!extractClasses(rule).some((candidate)=>candidate === applyCandidate)) {
rule.remove();
frontend/node_modules/tailwindcss/lib/lib/evaluateTailwindFunctions.js (Line 168:5 - Line 182:2), frontend/node_modules/tailwindcss/src/lib/evaluateTailwindFunctions.js (Line 183:3 - Line 196:2)
frontend/node_modules/tailwindcss/lib/lib/content.js (Line 1:1 - Line 13:20), frontend/node_modules/tailwindcss/lib/cli/build/utils.js (Line 1:1 - Line 13:16)
// @ts-check
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
parseCandidateFiles
frontend/node_modules/tailwindcss/lib/lib/cacheInvalidation.js (Line 12:2 - Line 73:4), frontend/node_modules/tailwindcss/lib/lib/generateRules.js (Line 37:33 - Line 52:9)
);
function _interop_require_default(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
function _getRequireWildcardCache(nodeInterop) {
if (typeof WeakMap !== "function") return null;
var cacheBabelInterop = new WeakMap();
var cacheNodeInterop = new WeakMap();
return (_getRequireWildcardCache = function(nodeInterop) {
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
})(nodeInterop);
}
function _interop_require_wildcard(obj, nodeInterop) {
if (!nodeInterop && obj && obj.__esModule) {
return obj;
}
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
return {
default: obj
};
}
var cache = _getRequireWildcardCache(nodeInterop);
if (cache && cache.has(obj)) {
return cache.get(obj);
}
var newObj = {};
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
for(var key in obj){
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
if (desc && (desc.get || desc.set)) {
Object.defineProperty(newObj, key, desc);
} else {
newObj[key] = obj[key];
}
}
}
newObj.default = obj;
if (cache) {
cache.set(obj, newObj);
}
return newObj;
}
/**
* Calculate the hash of a string.
*
* This doesn't need to be cryptographically secure or
* anything like that since it's used only to detect
* when the CSS changes to invalidate the context.
*
* This is wrapped in a try/catch because it's really dependent
* on how Node itself is build and the environment and OpenSSL
* version / build that is installed on the user's machine.
*
* Based on the environment this can just outright fail.
*
* See https://github.com/nodejs/node/issues/40455
*
* @param {string} str
*/
frontend/node_modules/sucrase/dist/util/shouldElideDefaultExport.js (Line 8:2 - Line 25:7), frontend/node_modules/sucrase/dist/esm/util/shouldElideDefaultExport.js (Line 8:2 - Line 25:3)
function shouldElideDefaultExport(
isTypeScriptTransformEnabled,
keepUnusedImports,
tokens,
declarationInfo,
) {
if (!isTypeScriptTransformEnabled || keepUnusedImports) {
return false;
}
const exportToken = tokens.currentToken();
if (exportToken.rhsEndIndex == null) {
throw new Error("Expected non-null rhsEndIndex on export token.");
}
// The export must be of the form `export default a` or `export default a;`.
const numTokens = exportToken.rhsEndIndex - tokens.currentIndex();
if (
numTokens !== 3 &&
!(numTokens === 4 && tokens.matches1AtIndex(exportToken.rhsEndIndex - 1, _types
frontend/node_modules/sucrase/dist/util/isIdentifier.js (Line 1:2 - Line 68:9), frontend/node_modules/sucrase/dist/esm/util/isIdentifier.js (Line 1:28 - Line 68:7)
;
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar
// Hard-code a list of reserved words rather than trying to use keywords or contextual keywords
// from the parser, since currently there are various exceptions, like `package` being reserved
// but unused and various contextual keywords being reserved. Note that we assume that all code
// compiled by Sucrase is in a module, so strict mode words and await are all considered reserved
// here.
const RESERVED_WORDS = new Set([
// Reserved keywords as of ECMAScript 2015
"break",
"case",
"catch",
"class",
"const",
"continue",
"debugger",
"default",
"delete",
"do",
"else",
"export",
"extends",
"finally",
"for",
"function",
"if",
"import",
"in",
"instanceof",
"new",
"return",
"super",
"switch",
"this",
"throw",
"try",
"typeof",
"var",
"void",
"while",
"with",
"yield",
// Future reserved keywords
"enum",
"implements",
"interface",
"let",
"package",
"private",
"protected",
"public",
"static",
"await",
// Literals that cannot be used as identifiers
"false",
"null",
"true",
]);
/**
* Determine if the given name is a legal variable name.
*
* This is needed when transforming TypeScript enums; if an enum key is a valid
* variable name, it might be referenced later in the enum, so we need to
* declare a variable.
*/
function
frontend/node_modules/sucrase/dist/util/isAsyncOperation.js (Line 13:2 - Line 29:10), frontend/node_modules/sucrase/dist/esm/util/isAsyncOperation.js (Line 13:2 - Line 29:18)
function isAsyncOperation(tokens) {
let index = tokens.currentIndex();
let depth = 0;
const startToken = tokens.currentToken();
do {
const token = tokens.tokens[index];
if (token.isOptionalChainStart) {
depth++;
}
if (token.isOptionalChainEnd) {
depth--;
}
depth += token.numNullishCoalesceStarts;
depth -= token.numNullishCoalesceEnds;
if (
token.contextualKeyword === _keywords
frontend/node_modules/sucrase/dist/util/getJSXPragmaInfo.js (Line 16:1 - Line 22:2), frontend/node_modules/sucrase/dist/esm/util/getJSXPragmaInfo.js (Line 16:1 - Line 22:2)
function splitPragma(pragma) {
let dotIndex = pragma.indexOf(".");
if (dotIndex === -1) {
dotIndex = pragma.length;
}
return [pragma.slice(0, dotIndex), pragma.slice(dotIndex)];
}
frontend/node_modules/sucrase/dist/util/getImportExportSpecifierInfo.js (Line 41:2 - Line 87:8), frontend/node_modules/sucrase/dist/esm/util/getImportExportSpecifierInfo.js (Line 41:2 - Line 89:9)
function getImportExportSpecifierInfo(
tokens,
index = tokens.currentIndex(),
) {
let endIndex = index + 1;
if (isSpecifierEnd(tokens, endIndex)) {
// import {A}
const name = tokens.identifierNameAtIndex(index);
return {
isType: false,
leftName: name,
rightName: name,
endIndex,
};
}
endIndex++;
if (isSpecifierEnd(tokens, endIndex)) {
// import {type A}
return {
isType: true,
leftName: null,
rightName: null,
endIndex,
};
}
endIndex++;
if (isSpecifierEnd(tokens, endIndex)) {
// import {A as B}
return {
isType: false,
leftName: tokens.identifierNameAtIndex(index),
rightName: tokens.identifierNameAtIndex(index + 2),
endIndex,
};
}
endIndex++;
if (isSpecifierEnd(tokens, endIndex)) {
// import {type A as B}
return {
isType: true,
leftName: null,
rightName: null,
endIndex,
};
}
throw new Error(`Unexpected import/export specifier at ${index}`);
} exports
frontend/node_modules/sucrase/dist/util/getDeclarationInfo.js (Line 26:2 - Line 31:7), frontend/node_modules/sucrase/dist/esm/util/getDeclarationInfo.js (Line 26:2 - Line 31:3)
function getDeclarationInfo(tokens) {
const typeDeclarations = new Set();
const valueDeclarations = new Set();
for (let i = 0; i < tokens.tokens.length; i++) {
const token = tokens.tokens[i];
if (token.type === _types
frontend/node_modules/sucrase/dist/util/getClassInfo.js (Line 48:2 - Line 71:7), frontend/node_modules/sucrase/dist/esm/util/getClassInfo.js (Line 48:2 - Line 71:3)
function getClassInfo(
rootTransformer,
tokens,
nameManager,
disableESTransforms,
) {
const snapshot = tokens.snapshot();
const headerInfo = processClassHeader(tokens);
let constructorInitializerStatements = [];
const instanceInitializerNames = [];
const staticInitializerNames = [];
let constructorInsertPos = null;
const fields = [];
const rangesToRemove = [];
const classContextId = tokens.currentToken().contextId;
if (classContextId == null) {
throw new Error("Expected non-null class context ID on class open-brace.");
}
tokens.nextToken();
while (!tokens.matchesContextIdAndLabel(_types
frontend/node_modules/sucrase/dist/util/getClassInfo.js (Line 74:10 - Line 88:7), frontend/node_modules/sucrase/dist/esm/util/getClassInfo.js (Line 74:3 - Line 88:3)
.semi)) {
if (!disableESTransforms) {
rangesToRemove.push({start: tokens.currentIndex(), end: tokens.currentIndex() + 1});
}
tokens.nextToken();
} else if (tokens.currentToken().isType) {
tokens.nextToken();
} else {
// Either a method or a field. Skip to the identifier part.
const statementStartIndex = tokens.currentIndex();
let isStatic = false;
let isESPrivate = false;
let isDeclareOrAbstract = false;
while (isAccessModifier(tokens.currentToken())) {
if (tokens.matches1(_types
frontend/node_modules/sucrase/dist/util/getClassInfo.js (Line 110:2 - Line 119:7), frontend/node_modules/sucrase/dist/esm/util/getClassInfo.js (Line 110:2 - Line 119:3)
frontend/node_modules/sucrase/dist/util/getClassInfo.js (Line 128:10 - Line 195:8), frontend/node_modules/sucrase/dist/esm/util/getClassInfo.js (Line 128:3 - Line 203:4)
.eq)) {
const equalsIndex = tokens.currentIndex();
// This is an initializer, so we need to wrap in an initializer method.
const valueEnd = tokens.currentToken().rhsEndIndex;
if (valueEnd == null) {
throw new Error("Expected rhsEndIndex on class field assignment.");
}
tokens.nextToken();
while (tokens.currentIndex() < valueEnd) {
rootTransformer.processToken();
}
let initializerName;
if (isStatic) {
initializerName = nameManager.claimFreeName("__initStatic");
staticInitializerNames.push(initializerName);
} else {
initializerName = nameManager.claimFreeName("__init");
instanceInitializerNames.push(initializerName);
}
// Fields start at the name, so `static x = 1;` has a field range of `x = 1;`.
fields.push({
initializerName,
equalsIndex,
start: nameStartIndex,
end: tokens.currentIndex(),
});
} else if (!disableESTransforms || isDeclareOrAbstract) {
// This is a regular field declaration, like `x;`. With the class transform enabled, we just
// remove the line so that no output is produced. With the class transform disabled, we
// usually want to preserve the declaration (but still strip types), but if the `declare`
// or `abstract` keyword is specified, we should remove the line to avoid initializing the
// value to undefined.
rangesToRemove.push({start: statementStartIndex, end: tokens.currentIndex()});
}
}
}
tokens.restoreToSnapshot(snapshot);
if (disableESTransforms) {
// With ES transforms disabled, we don't want to transform regular class
// field declarations, and we don't need to do any additional tricks to
// reference the constructor for static init, but we still need to transform
// TypeScript field initializers defined as constructor parameters and we
// still need to remove `declare` fields. For now, we run the same code
// path but omit any field information, as if the class had no field
// declarations. In the future, when we fully drop the class fields
// transform, we can simplify this code significantly.
return {
headerInfo,
constructorInitializerStatements,
instanceInitializerNames: [],
staticInitializerNames: [],
constructorInsertPos,
fields: [],
rangesToRemove,
};
} else {
return {
headerInfo,
constructorInitializerStatements,
instanceInitializerNames,
staticInitializerNames,
constructorInsertPos,
fields,
rangesToRemove,
};
}
} exports
frontend/node_modules/sucrase/dist/util/getClassInfo.js (Line 197:1 - Line 227:7), frontend/node_modules/sucrase/dist/esm/util/getClassInfo.js (Line 197:1 - Line 227:3)
/**
* Move the token processor to the next method/field in the class.
*
* To do that, we seek forward to the next start of a class name (either an open
* bracket or an identifier, or the closing curly brace), then seek backward to
* include any access modifiers.
*/
function skipToNextClassElement(tokens, classContextId) {
tokens.nextToken();
while (tokens.currentToken().contextId !== classContextId) {
tokens.nextToken();
}
while (isAccessModifier(tokens.tokenAtRelativeIndex(-1))) {
tokens.previousToken();
}
}
function processClassHeader(tokens) {
const classToken = tokens.currentToken();
const contextId = classToken.contextId;
if (contextId == null) {
throw new Error("Expected context ID on class token.");
}
const isExpression = classToken.isExpression;
if (isExpression == null) {
throw new Error("Expected isExpression on class token.");
}
let className = null;
let hasSuperclass = false;
tokens.nextToken();
if (tokens.matches1(_types
frontend/node_modules/sucrase/dist/util/getClassInfo.js (Line 235:10 - Line 258:7), frontend/node_modules/sucrase/dist/esm/util/getClassInfo.js (Line 235:3 - Line 258:3)
._extends) && !tokens.currentToken().isType) {
hasSuperclass = true;
}
tokens.nextToken();
}
return {isExpression, className, hasSuperclass};
}
/**
* Extract useful information out of a constructor, starting at the "constructor" name.
*/
function processConstructor(tokens)
{
const constructorInitializerStatements = [];
tokens.nextToken();
const constructorContextId = tokens.currentToken().contextId;
if (constructorContextId == null) {
throw new Error("Expected context ID on open-paren starting constructor params.");
}
// Advance through parameters looking for access modifiers.
while (!tokens.matchesContextIdAndLabel(_types
frontend/node_modules/sucrase/dist/util/getClassInfo.js (Line 258:10 - Line 269:7), frontend/node_modules/sucrase/dist/esm/util/getClassInfo.js (Line 258:3 - Line 269:3)
.parenR, constructorContextId)) {
if (tokens.currentToken().contextId === constructorContextId) {
// Current token is an open paren or comma just before a param, so check
// that param for access modifiers.
tokens.nextToken();
if (isAccessModifier(tokens.currentToken())) {
tokens.nextToken();
while (isAccessModifier(tokens.currentToken())) {
tokens.nextToken();
}
const token = tokens.currentToken();
if (token.type !== _types
frontend/node_modules/sucrase/dist/util/getClassInfo.js (Line 269:10 - Line 290:7), frontend/node_modules/sucrase/dist/esm/util/getClassInfo.js (Line 269:3 - Line 290:3)
.name) {
throw new Error("Expected identifier after access modifiers in constructor arg.");
}
const name = tokens.identifierNameForToken(token);
constructorInitializerStatements.push(`this.${name} = ${name}`);
}
} else {
tokens.nextToken();
}
}
// )
tokens.nextToken();
// Constructor type annotations are invalid, but skip them anyway since
// they're easy to skip.
while (tokens.currentToken().isType) {
tokens.nextToken();
}
let constructorInsertPos = tokens.currentIndex();
// Advance through body looking for a super call.
let foundSuperCall = false;
while (!tokens.matchesContextIdAndLabel(_types
frontend/node_modules/sucrase/dist/util/getClassInfo.js (Line 297:10 - Line 316:7), frontend/node_modules/sucrase/dist/esm/util/getClassInfo.js (Line 297:3 - Line 316:3)
.parenR, superCallContextId)) {
tokens.nextToken();
}
constructorInsertPos = tokens.currentIndex();
foundSuperCall = true;
}
tokens.nextToken();
}
// }
tokens.nextToken();
return {constructorInitializerStatements, constructorInsertPos};
}
/**
* Determine if this is any token that can go before the name in a method/field.
*/
function isAccessModifier(token) {
return [
_types
frontend/node_modules/sucrase/dist/util/formatTokens.js (Line 6:2 - Line 18:2), frontend/node_modules/sucrase/dist/esm/util/formatTokens.js (Line 6:2 - Line 18:16)
function formatTokens(code, tokens) {
if (tokens.length === 0) {
return "";
}
const tokenKeys = Object.keys(tokens[0]).filter(
(k) => k !== "type" && k !== "value" && k !== "start" && k !== "end" && k !== "loc",
);
const typeKeys = Object.keys(tokens[0].type).filter((k) => k !== "label" && k !== "keyword");
const headings = ["Location", "Label", "Raw", ...tokenKeys, ...typeKeys];
const lines = new (
frontend/node_modules/sucrase/dist/util/formatTokens.js (Line 18:2 - Line 34:7), frontend/node_modules/sucrase/dist/esm/util/formatTokens.js (Line 18:16 - Line 34:16)
(code);
const rows = [headings, ...tokens.map(getTokenComponents)];
const padding = headings.map(() => 0);
for (const components of rows) {
for (let i = 0; i < components.length; i++) {
padding[i] = Math.max(padding[i], components[i].length);
}
}
return rows
.map((components) => components.map((component, i) => component.padEnd(padding[i])).join(" "))
.join("\n");
function getTokenComponents(token) {
const raw = code.slice(token.start, token.end);
return [
formatRange(token.start, token.end),
_types
frontend/node_modules/sucrase/dist/util/formatTokens.js (Line 34:2 - Line 66:8), frontend/node_modules/sucrase/dist/esm/util/formatTokens.js (Line 34:2 - Line 68:9)
frontend/node_modules/sucrase/dist/transformers/TypeScriptTransformer.js (Line 65:10 - Line 85:7), frontend/node_modules/sucrase/dist/esm/transformers/TypeScriptTransformer.js (Line 65:3 - Line 85:3)
.braceR);
if (isExport && this.isImportsTransformEnabled) {
this.tokens.appendCode(`)(${enumName} || (exports.${enumName} = ${enumName} = {}));`);
} else {
this.tokens.appendCode(`)(${enumName} || (${enumName} = {}));`);
}
}
/**
* Transform an enum into equivalent JS. This has complexity in a few places:
* - TS allows string enums, numeric enums, and a mix of the two styles within an enum.
* - Enum keys are allowed to be referenced in later enum values.
* - Enum keys are allowed to be strings.
* - When enum values are omitted, they should follow an auto-increment behavior.
*/
processEnumBody(enumName) {
// Code that can be used to reference the previous enum member, or null if this is the first
// enum member.
let previousValueCode = null;
while (true) {
if (this.tokens.matches1(_types
frontend/node_modules/sucrase/dist/transformers/TypeScriptTransformer.js (Line 106:10 - Line 139:7), frontend/node_modules/sucrase/dist/esm/transformers/TypeScriptTransformer.js (Line 106:3 - Line 139:3)
.comma)) {
this.tokens.removeToken();
}
if (variableName != null) {
previousValueCode = variableName;
} else {
previousValueCode = `${enumName}[${nameStringCode}]`;
}
}
}
/**
* Detect name information about this enum key, which will be used to determine which code to emit
* and whether we should declare a variable as part of this declaration.
*
* Some cases to keep in mind:
* - Enum keys can be implicitly referenced later, e.g. `X = 1, Y = X`. In Sucrase, we implement
* this by declaring a variable `X` so that later expressions can use it.
* - In addition to the usual identifier key syntax, enum keys are allowed to be string literals,
* e.g. `"hello world" = 3,`. Template literal syntax is NOT allowed.
* - Even if the enum key is defined as a string literal, it may still be referenced by identifier
* later, e.g. `"X" = 1, Y = X`. That means that we need to detect whether or not a string
* literal is identifier-like and emit a variable if so, even if the declaration did not use an
* identifier.
* - Reserved keywords like `break` are valid enum keys, but are not valid to be referenced later
* and would be a syntax error if we emitted a variable, so we need to skip the variable
* declaration in those cases.
*
* The variableName return value captures these nuances: if non-null, we can and must emit a
* variable declaration, and if null, we can't and shouldn't.
*/
extractEnumKeyInfo(nameToken) {
if (nameToken.type === _types
frontend/node_modules/sucrase/dist/transformers/TypeScriptTransformer.js (Line 149:2 - Line 279:2), frontend/node_modules/sucrase/dist/esm/transformers/TypeScriptTransformer.js (Line 149:2 - Line 279:2)
name) ? name : null,
};
} else {
throw new Error("Expected name or string at beginning of enum element.");
}
}
/**
* Handle an enum member where the RHS is just a string literal (not omitted, not a number, and
* not a complex expression). This is the typical form for TS string enums, and in this case, we
* do *not* create a reverse mapping.
*
* This is called after deleting the key token, when the token processor is at the equals sign.
*
* Example 1:
* someKey = "some value"
* ->
* const someKey = "some value"; MyEnum["someKey"] = someKey;
*
* Example 2:
* "some key" = "some value"
* ->
* MyEnum["some key"] = "some value";
*/
processStringLiteralEnumMember(
enumName,
nameStringCode,
variableName,
) {
if (variableName != null) {
this.tokens.appendCode(`const ${variableName}`);
// =
this.tokens.copyToken();
// value string
this.tokens.copyToken();
this.tokens.appendCode(`; ${enumName}[${nameStringCode}] = ${variableName};`);
} else {
this.tokens.appendCode(`${enumName}[${nameStringCode}]`);
// =
this.tokens.copyToken();
// value string
this.tokens.copyToken();
this.tokens.appendCode(";");
}
}
/**
* Handle an enum member initialized with an expression on the right-hand side (other than a
* string literal). In these cases, we should transform the expression and emit code that sets up
* a reverse mapping.
*
* The TypeScript implementation of this operation distinguishes between expressions that can be
* "constant folded" at compile time (i.e. consist of number literals and simple math operations
* on those numbers) and ones that are dynamic. For constant expressions, it emits the resolved
* numeric value, and auto-incrementing is only allowed in that case. Evaluating expressions at
* compile time would add significant complexity to Sucrase, so Sucrase instead leaves the
* expression as-is, and will later emit something like `MyEnum["previousKey"] + 1` to implement
* auto-incrementing.
*
* This is called after deleting the key token, when the token processor is at the equals sign.
*
* Example 1:
* someKey = 1 + 1
* ->
* const someKey = 1 + 1; MyEnum[MyEnum["someKey"] = someKey] = "someKey";
*
* Example 2:
* "some key" = 1 + 1
* ->
* MyEnum[MyEnum["some key"] = 1 + 1] = "some key";
*/
processExplicitValueEnumMember(
enumName,
nameStringCode,
variableName,
) {
const rhsEndIndex = this.tokens.currentToken().rhsEndIndex;
if (rhsEndIndex == null) {
throw new Error("Expected rhsEndIndex on enum assign.");
}
if (variableName != null) {
this.tokens.appendCode(`const ${variableName}`);
this.tokens.copyToken();
while (this.tokens.currentIndex() < rhsEndIndex) {
this.rootTransformer.processToken();
}
this.tokens.appendCode(
`; ${enumName}[${enumName}[${nameStringCode}] = ${variableName}] = ${nameStringCode};`,
);
} else {
this.tokens.appendCode(`${enumName}[${enumName}[${nameStringCode}]`);
this.tokens.copyToken();
while (this.tokens.currentIndex() < rhsEndIndex) {
this.rootTransformer.processToken();
}
this.tokens.appendCode(`] = ${nameStringCode};`);
}
}
/**
* Handle an enum member with no right-hand side expression. In this case, the value is the
* previous value plus 1, or 0 if there was no previous value. We should also always emit a
* reverse mapping.
*
* Example 1:
* someKey2
* ->
* const someKey2 = someKey1 + 1; MyEnum[MyEnum["someKey2"] = someKey2] = "someKey2";
*
* Example 2:
* "some key 2"
* ->
* MyEnum[MyEnum["some key 2"] = someKey1 + 1] = "some key 2";
*/
processImplicitValueEnumMember(
enumName,
nameStringCode,
variableName,
previousValueCode,
) {
let valueCode = previousValueCode != null ? `${previousValueCode} + 1` : "0";
if (variableName != null) {
this.tokens.appendCode(`const ${variableName} = ${valueCode}; `);
valueCode = variableName;
}
this.tokens.appendCode(
`${enumName}[${enumName}[${nameStringCode}] = ${valueCode}] = ${nameStringCode};`,
);
}
}
frontend/node_modules/sucrase/dist/transformers/RootTransformer.js (Line 28:2 - Line 54:2), frontend/node_modules/sucrase/dist/esm/transformers/RootTransformer.js (Line 28:2 - Line 54:35)
frontend/node_modules/sucrase/dist/transformers/RootTransformer.js (Line 76:2 - Line 88:2), frontend/node_modules/sucrase/dist/esm/transformers/RootTransformer.js (Line 76:26 - Line 88:21)
(tokenProcessor, options.filePath);
this.transformers.push(reactHotLoaderTransformer);
}
// Note that we always want to enable the imports transformer, even when the import transform
// itself isn't enabled, since we need to do type-only import pruning for both Flow and
// TypeScript.
if (transforms.includes("imports")) {
if (importProcessor === null) {
throw new Error("Expected non-null importProcessor with imports transform enabled.");
}
this.transformers.push(
new (
frontend/node_modules/sucrase/dist/transformers/RootTransformer.js (Line 88:2 - Line 105:2), frontend/node_modules/sucrase/dist/esm/transformers/RootTransformer.js (Line 88:21 - Line 105:21)
frontend/node_modules/sucrase/dist/transformers/RootTransformer.js (Line 105:2 - Line 120:2), frontend/node_modules/sucrase/dist/esm/transformers/RootTransformer.js (Line 105:21 - Line 120:16)
(
tokenProcessor,
this.nameManager,
this.helperManager,
reactHotLoaderTransformer,
transforms.includes("typescript"),
transforms.includes("flow"),
Boolean(options.keepUnusedImports),
options,
),
);
}
if (transforms.includes("flow")) {
this.transformers.push(
new (
frontend/node_modules/sucrase/dist/transformers/RootTransformer.js (Line 130:2 - Line 179:7), frontend/node_modules/sucrase/dist/esm/transformers/RootTransformer.js (Line 130:21 - Line 179:3)
(this, tokenProcessor, this.nameManager, importProcessor),
);
}
}
transform() {
this.tokens.reset();
this.processBalancedCode();
const shouldAddUseStrict = this.isImportsTransformEnabled;
// "use strict" always needs to be first, so override the normal transformer order.
let prefix = shouldAddUseStrict ? '"use strict";' : "";
for (const transformer of this.transformers) {
prefix += transformer.getPrefixCode();
}
prefix += this.helperManager.emitHelpers();
prefix += this.generatedVariables.map((v) => ` var ${v};`).join("");
for (const transformer of this.transformers) {
prefix += transformer.getHoistedCode();
}
let suffix = "";
for (const transformer of this.transformers) {
suffix += transformer.getSuffixCode();
}
const result = this.tokens.finish();
let {code} = result;
if (code.startsWith("#!")) {
let newlineIndex = code.indexOf("\n");
if (newlineIndex === -1) {
newlineIndex = code.length;
code += "\n";
}
return {
code: code.slice(0, newlineIndex + 1) + prefix + code.slice(newlineIndex + 1) + suffix,
// The hashbang line has no tokens, so shifting the tokens to account
// for prefix can happen normally.
mappings: this.shiftMappings(result.mappings, prefix.length),
};
} else {
return {
code: prefix + code + suffix,
mappings: this.shiftMappings(result.mappings, prefix.length),
};
}
}
processBalancedCode() {
let braceDepth = 0;
let parenDepth = 0;
while (!this.tokens.isAtEnd()) {
if (this.tokens.matches1(_types
frontend/node_modules/sucrase/dist/transformers/RootTransformer.js (Line 200:10 - Line 217:7), frontend/node_modules/sucrase/dist/esm/transformers/RootTransformer.js (Line 200:3 - Line 217:3)
._class)) {
this.processClass();
return;
}
for (const transformer of this.transformers) {
const wasProcessed = transformer.process();
if (wasProcessed) {
return;
}
}
this.tokens.copyToken();
}
/**
* Skip past a class with a name and return that name.
*/
processNamedClass() {
if (!this.tokens.matches2(_types
frontend/node_modules/sucrase/dist/transformers/RootTransformer.js (Line 217:10 - Line 226:15), frontend/node_modules/sucrase/dist/esm/transformers/RootTransformer.js (Line 217:3 - Line 226:13)
.name)) {
throw new Error("Expected identifier for exported class name.");
}
const name = this.tokens.identifierNameAtIndex(this.tokens.currentIndex() + 1);
this.processClass();
return name;
}
processClass() {
const classInfo = _getClassInfo2
frontend/node_modules/sucrase/dist/transformers/RootTransformer.js (Line 226:2 - Line 246:7), frontend/node_modules/sucrase/dist/esm/transformers/RootTransformer.js (Line 226:2 - Line 246:3)
this, this.tokens, this.nameManager, this.disableESTransforms);
// Both static and instance initializers need a class name to use to invoke the initializer, so
// assign to one if necessary.
const needsCommaExpression =
(classInfo.headerInfo.isExpression || !classInfo.headerInfo.className) &&
classInfo.staticInitializerNames.length + classInfo.instanceInitializerNames.length > 0;
let className = classInfo.headerInfo.className;
if (needsCommaExpression) {
className = this.nameManager.claimFreeName("_class");
this.generatedVariables.push(className);
this.tokens.appendCode(` (${className} =`);
}
const classToken = this.tokens.currentToken();
const contextId = classToken.contextId;
if (contextId == null) {
throw new Error("Expected class to have a context ID.");
}
this.tokens.copyExpectedToken(_types
frontend/node_modules/sucrase/dist/transformers/RootTransformer.js (Line 247:10 - Line 284:7), frontend/node_modules/sucrase/dist/esm/transformers/RootTransformer.js (Line 247:3 - Line 284:3)
.braceL, contextId)) {
this.processToken();
}
this.processClassBody(classInfo, className);
const staticInitializerStatements = classInfo.staticInitializerNames.map(
(name) => `${className}.${name}()`,
);
if (needsCommaExpression) {
this.tokens.appendCode(
`, ${staticInitializerStatements.map((s) => `${s}, `).join("")}${className})`,
);
} else if (classInfo.staticInitializerNames.length > 0) {
this.tokens.appendCode(` ${staticInitializerStatements.map((s) => `${s};`).join(" ")}`);
}
}
/**
* We want to just handle class fields in all contexts, since TypeScript supports them. Later,
* when some JS implementations support class fields, this should be made optional.
*/
processClassBody(classInfo, className) {
const {
headerInfo,
constructorInsertPos,
constructorInitializerStatements,
fields,
instanceInitializerNames,
rangesToRemove,
} = classInfo;
let fieldIndex = 0;
let rangeToRemoveIndex = 0;
const classContextId = this.tokens.currentToken().contextId;
if (classContextId == null) {
throw new Error("Expected non-null context ID on class.");
}
this.tokens.copyExpectedToken(_types
frontend/node_modules/sucrase/dist/transformers/RootTransformer.js (Line 284:10 - Line 310:7), frontend/node_modules/sucrase/dist/esm/transformers/RootTransformer.js (Line 284:3 - Line 310:3)
frontend/node_modules/sucrase/dist/transformers/RootTransformer.js (Line 356:10 - Line 378:7), frontend/node_modules/sucrase/dist/esm/transformers/RootTransformer.js (Line 356:3 - Line 378:3)
.braceR);
}
makeConstructorInitCode(
constructorInitializerStatements,
instanceInitializerNames,
className,
) {
return [
...constructorInitializerStatements,
...instanceInitializerNames.map((name) => `${className}.prototype.${name}.call(this)`),
].join(";");
}
/**
* Normally it's ok to simply remove type tokens, but we need to be more careful when dealing with
* arrow function return types since they can confuse the parser. In that case, we want to move
* the close-paren to the same line as the arrow.
*
* See https://github.com/alangpierce/sucrase/issues/391 for more details.
*/
processPossibleArrowParamEnd() {
if (this.tokens.matches2(_types
frontend/node_modules/sucrase/dist/transformers/RootTransformer.js (Line 378:10 - Line 384:7), frontend/node_modules/sucrase/dist/esm/transformers/RootTransformer.js (Line 378:3 - Line 384:3)
.colon) && this.tokens.tokenAtRelativeIndex(1).isType) {
let nextNonTypeIndex = this.tokens.currentIndex() + 1;
// Look ahead to see if this is an arrow function or something else.
while (this.tokens.tokens[nextNonTypeIndex].isType) {
nextNonTypeIndex++;
}
if (this.tokens.matches1AtIndex(nextNonTypeIndex, _types
frontend/node_modules/sucrase/dist/transformers/RootTransformer.js (Line 384:10 - Line 408:10), frontend/node_modules/sucrase/dist/esm/transformers/RootTransformer.js (Line 384:3 - Line 408:18)
.arrow)) {
this.tokens.removeInitialToken();
while (this.tokens.currentIndex() < nextNonTypeIndex) {
this.tokens.removeToken();
}
this.tokens.replaceTokenTrimmingLeftWhitespace(") =>");
return true;
}
}
return false;
}
/**
* An async arrow function might be of the form:
*
* async <
* T
* >() => {}
*
* in which case, removing the type parameters will cause a syntax error. Detect this case and
* move the open-paren earlier.
*/
processPossibleAsyncArrowWithTypeParams() {
if (
!this.tokens.matchesContextual(_keywords
frontend/node_modules/sucrase/dist/transformers/RootTransformer.js (Line 414:10 - Line 423:7), frontend/node_modules/sucrase/dist/esm/transformers/RootTransformer.js (Line 414:3 - Line 423:3)
.lessThan || !nextToken.isType) {
return false;
}
let nextNonTypeIndex = this.tokens.currentIndex() + 1;
// Look ahead to see if this is an arrow function or something else.
while (this.tokens.tokens[nextNonTypeIndex].isType) {
nextNonTypeIndex++;
}
if (this.tokens.matches1AtIndex(nextNonTypeIndex, _types
frontend/node_modules/sucrase/dist/transformers/RootTransformer.js (Line 423:10 - Line 462:2), frontend/node_modules/sucrase/dist/esm/transformers/RootTransformer.js (Line 423:3 - Line 462:2)
.parenL)) {
this.tokens.replaceToken("async (");
this.tokens.removeInitialToken();
while (this.tokens.currentIndex() < nextNonTypeIndex) {
this.tokens.removeToken();
}
this.tokens.removeToken();
// We ate a ( token, so we need to process the tokens in between and then the ) token so that
// we remain balanced.
this.processBalancedCode();
this.processToken();
return true;
}
return false;
}
processPossibleTypeRange() {
if (this.tokens.currentToken().isType) {
this.tokens.removeInitialToken();
while (this.tokens.currentToken().isType) {
this.tokens.removeToken();
}
return true;
}
return false;
}
shiftMappings(
mappings,
prefixLength,
) {
for (let i = 0; i < mappings.length; i++) {
const mapping = mappings[i];
if (mapping !== undefined) {
mappings[i] = mapping + prefixLength;
}
}
return mappings;
}
}
frontend/node_modules/sucrase/dist/transformers/ReactHotLoaderTransformer.js (Line 5:2 - Line 31:11), frontend/node_modules/sucrase/dist/esm/transformers/ReactHotLoaderTransformer.js (Line 5:2 - Line 31:22)
frontend/node_modules/sucrase/dist/transformers/ReactDisplayNameTransformer.js (Line 37:10 - Line 69:7), frontend/node_modules/sucrase/dist/esm/transformers/ReactDisplayNameTransformer.js (Line 37:3 - Line 69:3)
.name) &&
this.tokens.identifierName() === "React" &&
this.tokens.identifierNameAtIndex(this.tokens.currentIndex() + 2) === "createClass"
) {
const newName = this.importProcessor
? this.importProcessor.getIdentifierReplacement("React") || "React"
: "React";
if (newName) {
this.tokens.replaceToken(newName);
this.tokens.copyToken();
this.tokens.copyToken();
} else {
this.tokens.copyToken();
this.tokens.copyToken();
this.tokens.copyToken();
}
this.tryProcessCreateClassCall(startIndex);
return true;
}
return false;
}
/**
* This is called with the token position at the open-paren.
*/
tryProcessCreateClassCall(startIndex) {
const displayName = this.findDisplayName(startIndex);
if (!displayName) {
return;
}
if (this.classNeedsDisplayName()) {
this.tokens.copyExpectedToken(_types
frontend/node_modules/sucrase/dist/transformers/ReactDisplayNameTransformer.js (Line 94:10 - Line 120:7), frontend/node_modules/sucrase/dist/esm/transformers/ReactDisplayNameTransformer.js (Line 94:3 - Line 120:3)
._default)) {
return this.getDisplayNameFromFilename();
}
return null;
}
getDisplayNameFromFilename() {
const filePath = this.options.filePath || "unknown";
const pathSegments = filePath.split("/");
const filename = pathSegments[pathSegments.length - 1];
const dotIndex = filename.lastIndexOf(".");
const baseFilename = dotIndex === -1 ? filename : filename.slice(0, dotIndex);
if (baseFilename === "index" && pathSegments[pathSegments.length - 2]) {
return pathSegments[pathSegments.length - 2];
} else {
return baseFilename;
}
}
/**
* We only want to add a display name when this is a function call containing
* one argument, which is an object literal without `displayName` as an
* existing key.
*/
classNeedsDisplayName() {
let index = this.tokens.currentIndex();
if (!this.tokens.matches2(_types
frontend/node_modules/sucrase/dist/transformers/ReactDisplayNameTransformer.js (Line 120:10 - Line 134:7), frontend/node_modules/sucrase/dist/esm/transformers/ReactDisplayNameTransformer.js (Line 120:3 - Line 134:3)
.braceL)) {
return false;
}
// The block starts on the {, and we expect any displayName key to be in
// that context. We need to ignore other other contexts to avoid matching
// nested displayName keys.
const objectStartIndex = index + 1;
const objectContextId = this.tokens.tokens[objectStartIndex].contextId;
if (objectContextId == null) {
throw new Error("Expected non-null context ID on object open-brace.");
}
for (; index < this.tokens.tokens.length; index++) {
const token = this.tokens.tokens[index];
if (token.type === _types
frontend/node_modules/sucrase/dist/transformers/ReactDisplayNameTransformer.js (Line 141:2 - Line 156:7), frontend/node_modules/sucrase/dist/esm/transformers/ReactDisplayNameTransformer.js (Line 141:2 - Line 156:3)
IdentifierRole.ObjectKey &&
token.contextId === objectContextId
) {
// We found a displayName key, so bail out.
return false;
}
}
if (index === this.tokens.tokens.length) {
throw new Error("Unexpected end of input when processing React class.");
}
// If we got this far, we know we have createClass with an object with no
// display name, so we want to proceed as long as that was the only argument.
return (
this.tokens.matches1AtIndex(index, _types
frontend/node_modules/sucrase/dist/transformers/OptionalChainingNullishTransformer.js (Line 21:10 - Line 30:7), frontend/node_modules/sucrase/dist/esm/transformers/OptionalChainingNullishTransformer.js (Line 21:3 - Line 30:3)
frontend/node_modules/sucrase/dist/transformers/OptionalChainingNullishTransformer.js (Line 30:10 - Line 44:7), frontend/node_modules/sucrase/dist/esm/transformers/OptionalChainingNullishTransformer.js (Line 30:3 - Line 44:3)
._delete)) {
const nextToken = this.tokens.tokenAtRelativeIndex(1);
if (nextToken.isOptionalChainStart) {
this.tokens.removeInitialToken();
return true;
}
}
const token = this.tokens.currentToken();
const chainStart = token.subscriptStartIndex;
if (
chainStart != null &&
this.tokens.tokens[chainStart].isOptionalChainStart &&
// Super subscripts can't be optional (since super is never null/undefined), and the syntax
// relies on the subscript being intact, so leave this token alone.
this.tokens.tokenAtRelativeIndex(-1).type !== _types
frontend/node_modules/sucrase/dist/transformers/OptionalChainingNullishTransformer.js (Line 50:10 - Line 64:7), frontend/node_modules/sucrase/dist/esm/transformers/OptionalChainingNullishTransformer.js (Line 50:3 - Line 64:3)
._delete) &&
this.isLastSubscriptInChain()
) {
// Delete operations are special: we already removed the delete keyword, and to still
// perform a delete, we need to insert a delete in the very last part of the chain, which
// in correct code will always be a property access.
arrowStartSnippet = `${param} => delete ${param}`;
} else {
arrowStartSnippet = `${param} => ${param}`;
}
if (this.tokens.tokens[chainStart].isAsyncOperation) {
arrowStartSnippet = `async ${arrowStartSnippet}`;
}
if (
this.tokens.matches2(_types
frontend/node_modules/sucrase/dist/transformers/OptionalChainingNullishTransformer.js (Line 79:10 - Line 150:7), frontend/node_modules/sucrase/dist/esm/transformers/OptionalChainingNullishTransformer.js (Line 79:3 - Line 150:3)
.parenL)) {
if (this.justSkippedSuper()) {
this.tokens.appendCode(".bind(this)");
}
this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'call', ${arrowStartSnippet}(`);
} else {
throw new Error("Unexpected subscript operator in optional chain.");
}
return true;
}
return false;
}
/**
* Determine if the current token is the last of its chain, so that we know whether it's eligible
* to have a delete op inserted.
*
* We can do this by walking forward until we determine one way or another. Each
* isOptionalChainStart token must be paired with exactly one isOptionalChainEnd token after it in
* a nesting way, so we can track depth and walk to the end of the chain (the point where the
* depth goes negative) and see if any other subscript token is after us in the chain.
*/
isLastSubscriptInChain() {
let depth = 0;
for (let i = this.tokens.currentIndex() + 1; ; i++) {
if (i >= this.tokens.tokens.length) {
throw new Error("Reached the end of the code while finding the end of the access chain.");
}
if (this.tokens.tokens[i].isOptionalChainStart) {
depth++;
} else if (this.tokens.tokens[i].isOptionalChainEnd) {
depth--;
}
if (depth < 0) {
return true;
}
// This subscript token is a later one in the same chain.
if (depth === 0 && this.tokens.tokens[i].subscriptStartIndex != null) {
return false;
}
}
}
/**
* Determine if we are the open-paren in an expression like super.a()?.b.
*
* We can do this by walking backward to find the previous subscript. If that subscript was
* preceded by a super, then we must be the subscript after it, so if this is a call expression,
* we'll need to attach the right context.
*/
justSkippedSuper() {
let depth = 0;
let index = this.tokens.currentIndex() - 1;
while (true) {
if (index < 0) {
throw new Error(
"Reached the start of the code while finding the start of the access chain.",
);
}
if (this.tokens.tokens[index].isOptionalChainStart) {
depth--;
} else if (this.tokens.tokens[index].isOptionalChainEnd) {
depth++;
}
if (depth < 0) {
return false;
}
// This subscript token is a later one in the same chain.
if (depth === 0 && this.tokens.tokens[index].subscriptStartIndex != null) {
return this.tokens.tokens[index - 1].type === _types
frontend/node_modules/sucrase/dist/transformers/OptionalCatchBindingTransformer.js (Line 1:1 - Line 6:6), frontend/node_modules/sucrase/dist/transformers/OptionalChainingNullishTransformer.js (Line 1:1 - Line 14:4)
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var _types = require('../parser/tokenizer/types');
var _Transformer = require('./Transformer'); var _Transformer2 = _interopRequireDefault(_Transformer);
class
frontend/node_modules/sucrase/dist/transformers/NumericSeparatorTransformer.js (Line 11:10 - Line 20:2), frontend/node_modules/sucrase/dist/esm/transformers/NumericSeparatorTransformer.js (Line 11:3 - Line 20:2)
frontend/node_modules/sucrase/dist/transformers/JestHoistTransformer.js (Line 34:10 - Line 74:7), frontend/node_modules/sucrase/dist/esm/transformers/JestHoistTransformer.js (Line 34:3 - Line 74:3)
.parenL) &&
this.tokens.identifierName() === JEST_GLOBAL_NAME
) {
// TODO: This only works if imports transform is active, which it will be for jest.
// But if jest adds module support and we no longer need the import transform, this needs fixing.
if (_optionalChain([this, 'access', _ => _.importProcessor, 'optionalAccess', _2 => _2.getGlobalNames, 'call', _3 => _3(), 'optionalAccess', _4 => _4.has, 'call', _5 => _5(JEST_GLOBAL_NAME)])) {
return false;
}
return this.extractHoistedCalls();
}
return false;
}
getHoistedCode() {
if (this.hoistedFunctionNames.length > 0) {
// This will be placed before module interop code, but that's fine since
// imports aren't allowed in module mock factories.
return this.hoistedFunctionNames.map((name) => `${name}();`).join("");
}
return "";
}
/**
* Extracts any methods calls on the jest-object that should be hoisted.
*
* According to the jest docs, https://jestjs.io/docs/en/jest-object#jestmockmodulename-factory-options,
* mock, unmock, enableAutomock, disableAutomock, are the methods that should be hoisted.
*
* We do not apply the same checks of the arguments as babel-plugin-jest-hoist does.
*/
extractHoistedCalls() {
// We're handling a chain of calls where `jest` may or may not need to be inserted for each call
// in the chain, so remove the initial `jest` to make the loop implementation cleaner.
this.tokens.removeToken();
// Track some state so that multiple non-hoisted chained calls in a row keep their chaining
// syntax.
let followsNonHoistedJestCall = false;
// Iterate through all chained calls on the jest object.
while (this.tokens.matches3(_types
frontend/node_modules/sucrase/dist/transformers/JestHoistTransformer.js (Line 74:10 - Line 86:7), frontend/node_modules/sucrase/dist/esm/transformers/JestHoistTransformer.js (Line 74:3 - Line 86:3)
.parenL)) {
const methodName = this.tokens.identifierNameAtIndex(this.tokens.currentIndex() + 1);
const shouldHoist = HOISTED_METHODS.includes(methodName);
if (shouldHoist) {
// We've matched e.g. `.mock(...)` or similar call.
// Replace the initial `.` with `function __jestHoist(){jest.`
const hoistedFunctionName = this.nameManager.claimFreeName("__jestHoist");
this.hoistedFunctionNames.push(hoistedFunctionName);
this.tokens.replaceToken(`function ${hoistedFunctionName}(){${JEST_GLOBAL_NAME}.`);
this.tokens.copyToken();
this.tokens.copyToken();
this.rootTransformer.processBalancedCode();
this.tokens.copyExpectedToken(_types
frontend/node_modules/sucrase/dist/transformers/JestHoistTransformer.js (Line 86:10 - Line 104:7), frontend/node_modules/sucrase/dist/esm/transformers/JestHoistTransformer.js (Line 86:3 - Line 104:3)
.parenR);
this.tokens.appendCode(";}");
followsNonHoistedJestCall = false;
} else {
// This is a non-hoisted method, so just transform the code as usual.
if (followsNonHoistedJestCall) {
// If we didn't hoist the previous call, we can leave the code as-is to chain off of the
// previous method call. It's important to preserve the code here because we don't know
// for sure that the method actually returned the jest object for chaining.
this.tokens.copyToken();
} else {
// If we hoisted the previous call, we know it returns the jest object back, so we insert
// the identifier `jest` to continue the chain.
this.tokens.replaceToken(`${JEST_GLOBAL_NAME}.`);
}
this.tokens.copyToken();
this.tokens.copyToken();
this.rootTransformer.processBalancedCode();
this.tokens.copyExpectedToken(_types
frontend/node_modules/sucrase/dist/transformers/JSXTransformer.js (Line 13:2 - Line 39:19), frontend/node_modules/sucrase/dist/esm/transformers/JSXTransformer.js (Line 13:2 - Line 39:17)
{
// State for calculating the line number of each JSX tag in development.
__init() {this.lastLineNumber = 1}
__init2() {this.lastIndex = 0}
// In development, variable name holding the name of the current file.
__init3() {this.filenameVarName = null}
// Mapping of claimed names for imports in the automatic transform, e,g.
// {jsx: "_jsx"}. This determines which imports to generate in the prefix.
__init4() {this.esmAutomaticImportNameResolutions = {}}
// When automatically adding imports in CJS mode, we store the variable name
// holding the imported CJS module so we can require it in the prefix.
__init5() {this.cjsAutomaticModuleNameResolutions = {}}
constructor(
rootTransformer,
tokens,
importProcessor,
nameManager,
options,
) {
super();this.rootTransformer = rootTransformer;this.tokens = tokens;this.importProcessor = importProcessor;this.nameManager = nameManager;this.options = options;JSXTransformer.prototype.__init.call(this);JSXTransformer.prototype.__init2.call(this);JSXTransformer.prototype.__init3.call(this);JSXTransformer.prototype.__init4.call(this);JSXTransformer.prototype.__init5.call(this);;
this.jsxPragmaInfo = _getJSXPragmaInfo2
frontend/node_modules/sucrase/dist/transformers/JSXTransformer.js (Line 45:10 - Line 88:11), frontend/node_modules/sucrase/dist/esm/transformers/JSXTransformer.js (Line 45:3 - Line 88:8)
.jsxTagStart)) {
this.processJSXTag();
return true;
}
return false;
}
getPrefixCode() {
let prefix = "";
if (this.filenameVarName) {
prefix += `const ${this.filenameVarName} = ${JSON.stringify(this.options.filePath || "")};`;
}
if (this.isAutomaticRuntime) {
if (this.importProcessor) {
// CJS mode: emit require statements for all modules that were referenced.
for (const [path, resolvedName] of Object.entries(this.cjsAutomaticModuleNameResolutions)) {
prefix += `var ${resolvedName} = require("${path}");`;
}
} else {
// ESM mode: consolidate and emit import statements for referenced names.
const {createElement: createElementResolution, ...otherResolutions} =
this.esmAutomaticImportNameResolutions;
if (createElementResolution) {
prefix += `import {createElement as ${createElementResolution}} from "${this.jsxImportSource}";`;
}
const importSpecifiers = Object.entries(otherResolutions)
.map(([name, resolvedName]) => `${name} as ${resolvedName}`)
.join(", ");
if (importSpecifiers) {
const importPath =
this.jsxImportSource + (this.options.production ? "/jsx-runtime" : "/jsx-dev-runtime");
prefix += `import {${importSpecifiers}} from "${importPath}";`;
}
}
}
return prefix;
}
processJSXTag() {
const {jsxRole, start} = this.tokens.currentToken();
// Calculate line number information at the very start (if in development
// mode) so that the information is guaranteed to be queried in token order.
const elementLocationCode = this.options.production ? null : this.getElementLocationCode(start);
if (this.isAutomaticRuntime && jsxRole !== _tokenizer
frontend/node_modules/sucrase/dist/transformers/JSXTransformer.js (Line 88:2 - Line 125:11), frontend/node_modules/sucrase/dist/esm/transformers/JSXTransformer.js (Line 88:2 - Line 125:8)
JSXRole.KeyAfterPropSpread) {
this.transformTagToJSXFunc(elementLocationCode, jsxRole);
} else {
this.transformTagToCreateElement(elementLocationCode);
}
}
getElementLocationCode(firstTokenStart) {
const lineNumber = this.getLineNumberForIndex(firstTokenStart);
return `lineNumber: ${lineNumber}`;
}
/**
* Get the line number for this source position. This is calculated lazily and
* must be called in increasing order by index.
*/
getLineNumberForIndex(index) {
const code = this.tokens.code;
while (this.lastIndex < index && this.lastIndex < code.length) {
if (code[this.lastIndex] === "\n") {
this.lastLineNumber++;
}
this.lastIndex++;
}
return this.lastLineNumber;
}
/**
* Convert the current JSX element to a call to jsx, jsxs, or jsxDEV. This is
* the primary transformation for the automatic transform.
*
* Example:
* <div a={1} key={2}>Hello{x}</div>
* becomes
* jsxs('div', {a: 1, children: ["Hello", x]}, 2)
*/
transformTagToJSXFunc(elementLocationCode, jsxRole) {
const isStatic = jsxRole === _tokenizer
frontend/node_modules/sucrase/dist/transformers/JSXTransformer.js (Line 130:10 - Line 140:7), frontend/node_modules/sucrase/dist/esm/transformers/JSXTransformer.js (Line 130:3 - Line 140:3)
.jsxTagEnd)) {
// Fragment syntax.
this.tokens.replaceToken(`${this.getFragmentCode()}, {`);
this.processAutomaticChildrenAndEndProps(jsxRole);
} else {
// Normal open tag or self-closing tag.
this.processTagIntro();
this.tokens.appendCode(", {");
keyCode = this.processProps(true);
if (this.tokens.matches2(_types
frontend/node_modules/sucrase/dist/transformers/JSXTransformer.js (Line 143:10 - Line 169:7), frontend/node_modules/sucrase/dist/esm/transformers/JSXTransformer.js (Line 143:3 - Line 169:3)
.jsxTagEnd)) {
// Tag with children.
this.tokens.removeToken();
this.processAutomaticChildrenAndEndProps(jsxRole);
} else {
throw new Error("Expected either /> or > at the end of the tag.");
}
// If a key was present, move it to its own arg. Note that moving code
// like this will cause line numbers to get out of sync within the JSX
// element if the key expression has a newline in it. This is unfortunate,
// but hopefully should be rare.
if (keyCode) {
this.tokens.appendCode(`, ${keyCode}`);
}
}
if (!this.options.production) {
// If the key wasn't already added, add it now so we can correctly set
// positional args for jsxDEV.
if (keyCode === null) {
this.tokens.appendCode(", void 0");
}
this.tokens.appendCode(`, ${isStatic}, ${this.getDevSource(elementLocationCode)}, this`);
}
// We're at the close-tag or the end of a self-closing tag, so remove
// everything else and close the function call.
this.tokens.removeInitialToken();
while (!this.tokens.matches1(_types
frontend/node_modules/sucrase/dist/transformers/JSXTransformer.js (Line 169:10 - Line 189:7), frontend/node_modules/sucrase/dist/esm/transformers/JSXTransformer.js (Line 169:3 - Line 189:3)
.jsxTagEnd)) {
this.tokens.removeToken();
}
this.tokens.replaceToken(")");
}
/**
* Convert the current JSX element to a createElement call. In the classic
* runtime, this is the only case. In the automatic runtime, this is called
* as a fallback in some situations.
*
* Example:
* <div a={1} key={2}>Hello{x}</div>
* becomes
* React.createElement('div', {a: 1, key: 2}, "Hello", x)
*/
transformTagToCreateElement(elementLocationCode) {
// First tag is always jsxTagStart.
this.tokens.replaceToken(this.getCreateElementInvocationCode());
if (this.tokens.matches1(_types
frontend/node_modules/sucrase/dist/transformers/JSXTransformer.js (Line 189:10 - Line 198:7), frontend/node_modules/sucrase/dist/esm/transformers/JSXTransformer.js (Line 189:3 - Line 198:3)
.jsxTagEnd)) {
// Fragment syntax.
this.tokens.replaceToken(`${this.getFragmentCode()}, null`);
this.processChildren(true);
} else {
// Normal open tag or self-closing tag.
this.processTagIntro();
this.processPropsObjectWithDevInfo(elementLocationCode);
if (this.tokens.matches2(_types
frontend/node_modules/sucrase/dist/transformers/JSXTransformer.js (Line 200:10 - Line 211:7), frontend/node_modules/sucrase/dist/esm/transformers/JSXTransformer.js (Line 200:3 - Line 211:3)
.jsxTagEnd)) {
// Tag with children and a close-tag; process the children as args.
this.tokens.removeToken();
this.processChildren(true);
} else {
throw new Error("Expected either /> or > at the end of the tag.");
}
}
// We're at the close-tag or the end of a self-closing tag, so remove
// everything else and close the function call.
this.tokens.removeInitialToken();
while (!this.tokens.matches1(_types
frontend/node_modules/sucrase/dist/transformers/JSXTransformer.js (Line 211:10 - Line 332:7), frontend/node_modules/sucrase/dist/esm/transformers/JSXTransformer.js (Line 211:3 - Line 332:3)
.jsxTagEnd)) {
this.tokens.removeToken();
}
this.tokens.replaceToken(")");
}
/**
* Get the code for the relevant function for this context: jsx, jsxs,
* or jsxDEV. The following open-paren is included as well.
*
* These functions are only used for the automatic runtime, so they are always
* auto-imported, but the auto-import will be either CJS or ESM based on the
* target module format.
*/
getJSXFuncInvocationCode(isStatic) {
if (this.options.production) {
if (isStatic) {
return this.claimAutoImportedFuncInvocation("jsxs", "/jsx-runtime");
} else {
return this.claimAutoImportedFuncInvocation("jsx", "/jsx-runtime");
}
} else {
return this.claimAutoImportedFuncInvocation("jsxDEV", "/jsx-dev-runtime");
}
}
/**
* Return the code to use for the createElement function, e.g.
* `React.createElement`, including the following open-paren.
*
* This is the main function to use for the classic runtime. For the
* automatic runtime, this function is used as a fallback function to
* preserve behavior when there is a prop spread followed by an explicit
* key. In that automatic runtime case, the function should be automatically
* imported.
*/
getCreateElementInvocationCode() {
if (this.isAutomaticRuntime) {
return this.claimAutoImportedFuncInvocation("createElement", "");
} else {
const {jsxPragmaInfo} = this;
const resolvedPragmaBaseName = this.importProcessor
? this.importProcessor.getIdentifierReplacement(jsxPragmaInfo.base) || jsxPragmaInfo.base
: jsxPragmaInfo.base;
return `${resolvedPragmaBaseName}${jsxPragmaInfo.suffix}(`;
}
}
/**
* Return the code to use as the component when compiling a shorthand
* fragment, e.g. `React.Fragment`.
*
* This may be called from either the classic or automatic runtime, and
* the value should be auto-imported for the automatic runtime.
*/
getFragmentCode() {
if (this.isAutomaticRuntime) {
return this.claimAutoImportedName(
"Fragment",
this.options.production ? "/jsx-runtime" : "/jsx-dev-runtime",
);
} else {
const {jsxPragmaInfo} = this;
const resolvedFragmentPragmaBaseName = this.importProcessor
? this.importProcessor.getIdentifierReplacement(jsxPragmaInfo.fragmentBase) ||
jsxPragmaInfo.fragmentBase
: jsxPragmaInfo.fragmentBase;
return resolvedFragmentPragmaBaseName + jsxPragmaInfo.fragmentSuffix;
}
}
/**
* Return code that invokes the given function.
*
* When the imports transform is enabled, use the CJSImportTransformer
* strategy of using `.call(void 0, ...` to avoid passing a `this` value in a
* situation that would otherwise look like a method call.
*/
claimAutoImportedFuncInvocation(funcName, importPathSuffix) {
const funcCode = this.claimAutoImportedName(funcName, importPathSuffix);
if (this.importProcessor) {
return `${funcCode}.call(void 0, `;
} else {
return `${funcCode}(`;
}
}
claimAutoImportedName(funcName, importPathSuffix) {
if (this.importProcessor) {
// CJS mode: claim a name for the module and mark it for import.
const path = this.jsxImportSource + importPathSuffix;
if (!this.cjsAutomaticModuleNameResolutions[path]) {
this.cjsAutomaticModuleNameResolutions[path] =
this.importProcessor.getFreeIdentifierForPath(path);
}
return `${this.cjsAutomaticModuleNameResolutions[path]}.${funcName}`;
} else {
// ESM mode: claim a name for this function and add it to the names that
// should be auto-imported when the prefix is generated.
if (!this.esmAutomaticImportNameResolutions[funcName]) {
this.esmAutomaticImportNameResolutions[funcName] = this.nameManager.claimFreeName(
`_${funcName}`,
);
}
return this.esmAutomaticImportNameResolutions[funcName];
}
}
/**
* Process the first part of a tag, before any props.
*/
processTagIntro() {
// Walk forward until we see one of these patterns:
// jsxName to start the first prop, preceded by another jsxName to end the tag name.
// jsxName to start the first prop, preceded by greaterThan to end the type argument.
// [open brace] to start the first prop.
// [jsxTagEnd] to end the open-tag.
// [slash, jsxTagEnd] to end the self-closing tag.
let introEnd = this.tokens.currentIndex() + 1;
while (
this.tokens.tokens[introEnd].isType ||
(!this.tokens.matches2AtIndex(introEnd - 1, _types
frontend/node_modules/sucrase/dist/transformers/JSXTransformer.js (Line 336:10 - Line 359:7), frontend/node_modules/sucrase/dist/esm/transformers/JSXTransformer.js (Line 336:3 - Line 359:3)
.jsxTagEnd))
) {
introEnd++;
}
if (introEnd === this.tokens.currentIndex() + 1) {
const tagName = this.tokens.identifierName();
if (startsWithLowerCase(tagName)) {
this.tokens.replaceToken(`'${tagName}'`);
}
}
while (this.tokens.currentIndex() < introEnd) {
this.rootTransformer.processToken();
}
}
/**
* Starting at the beginning of the props, add the props argument to
* React.createElement, including the comma before it.
*/
processPropsObjectWithDevInfo(elementLocationCode) {
const devProps = this.options.production
? ""
: `__self: this, __source: ${this.getDevSource(elementLocationCode)}`;
if (!this.tokens.matches1(_types
frontend/node_modules/sucrase/dist/transformers/JSXTransformer.js (Line 359:10 - Line 389:7), frontend/node_modules/sucrase/dist/esm/transformers/JSXTransformer.js (Line 359:3 - Line 389:3)
.braceL)) {
if (devProps) {
this.tokens.appendCode(`, {${devProps}}`);
} else {
this.tokens.appendCode(`, null`);
}
return;
}
this.tokens.appendCode(`, {`);
this.processProps(false);
if (devProps) {
this.tokens.appendCode(` ${devProps}}`);
} else {
this.tokens.appendCode("}");
}
}
/**
* Transform the core part of the props, assuming that a { has already been
* inserted before us and that a } will be inserted after us.
*
* If extractKeyCode is true (i.e. when using any jsx... function), any prop
* named "key" has its code captured and returned rather than being emitted to
* the output code. This shifts line numbers, and emitting the code later will
* correct line numbers again. If no key is found or if extractKeyCode is
* false, this function returns null.
*/
processProps(extractKeyCode) {
let keyCode = null;
while (true) {
if (this.tokens.matches2(_types
frontend/node_modules/sucrase/dist/transformers/JSXTransformer.js (Line 389:10 - Line 420:7), frontend/node_modules/sucrase/dist/esm/transformers/JSXTransformer.js (Line 389:3 - Line 420:3)
.eq)) {
// This is a regular key={value} or key="value" prop.
const propName = this.tokens.identifierName();
if (extractKeyCode && propName === "key") {
if (keyCode !== null) {
// The props list has multiple keys. Different implementations are
// inconsistent about what to do here: as of this writing, Babel and
// swc keep the *last* key and completely remove the rest, while
// TypeScript uses the *first* key and leaves the others as regular
// props. The React team collaborated with Babel on the
// implementation of this behavior, so presumably the Babel behavior
// is the one to use.
// Since we won't ever be emitting the previous key code, we need to
// at least emit its newlines here so that the line numbers match up
// in the long run.
this.tokens.appendCode(keyCode.replace(/[^\n]/g, ""));
}
// key
this.tokens.removeToken();
// =
this.tokens.removeToken();
const snapshot = this.tokens.snapshot();
this.processPropValue();
keyCode = this.tokens.dangerouslyGetAndRemoveCodeSinceSnapshot(snapshot);
// Don't add a comma
continue;
} else {
this.processPropName(propName);
this.tokens.replaceToken(": ");
this.processPropValue();
}
} else if (this.tokens.matches1(_types
frontend/node_modules/sucrase/dist/transformers/JSXTransformer.js (Line 425:10 - Line 448:7), frontend/node_modules/sucrase/dist/esm/transformers/JSXTransformer.js (Line 425:3 - Line 448:3)
.braceL)) {
// This is prop spread, like <div {...getProps()}>, which we can pass
// through fairly directly as an object spread.
this.tokens.replaceToken("");
this.rootTransformer.processBalancedCode();
this.tokens.replaceToken("");
} else {
break;
}
this.tokens.appendCode(",");
}
return keyCode;
}
processPropName(propName) {
if (propName.includes("-")) {
this.tokens.replaceToken(`'${propName}'`);
} else {
this.tokens.copyToken();
}
}
processPropValue() {
if (this.tokens.matches1(_types
frontend/node_modules/sucrase/dist/transformers/JSXTransformer.js (Line 452:10 - Line 472:11), frontend/node_modules/sucrase/dist/esm/transformers/JSXTransformer.js (Line 452:3 - Line 472:8)
.jsxTagStart)) {
this.processJSXTag();
} else {
this.processStringPropValue();
}
}
processStringPropValue() {
const token = this.tokens.currentToken();
const valueCode = this.tokens.code.slice(token.start + 1, token.end - 1);
const replacementCode = formatJSXTextReplacement(valueCode);
const literalCode = formatJSXStringValueLiteral(valueCode);
this.tokens.replaceToken(literalCode + replacementCode);
}
/**
* Starting in the middle of the props object literal, produce an additional
* prop for the children and close the object literal.
*/
processAutomaticChildrenAndEndProps(jsxRole) {
if (jsxRole === _tokenizer
frontend/node_modules/sucrase/dist/transformers/JSXTransformer.js (Line 481:2 - Line 496:7), frontend/node_modules/sucrase/dist/esm/transformers/JSXTransformer.js (Line 481:2 - Line 496:3)
JSXRole.OneChild) {
this.tokens.appendCode(" children: ");
}
this.processChildren(false);
this.tokens.appendCode("}");
}
}
/**
* Transform children into a comma-separated list, which will be either
* arguments to createElement or array elements of a children prop.
*/
processChildren(needsInitialComma) {
let needsComma = needsInitialComma;
while (true) {
if (this.tokens.matches2(_types
frontend/node_modules/sucrase/dist/transformers/JSXTransformer.js (Line 502:10 - Line 514:7), frontend/node_modules/sucrase/dist/esm/transformers/JSXTransformer.js (Line 502:3 - Line 514:3)
.braceR)) {
// Empty interpolations and comment-only interpolations are allowed
// and don't create an extra child arg.
this.tokens.replaceToken("");
this.tokens.replaceToken("");
} else {
// Interpolated expression.
this.tokens.replaceToken(needsComma ? ", " : "");
this.rootTransformer.processBalancedCode();
this.tokens.replaceToken("");
didEmitElement = true;
}
} else if (this.tokens.matches1(_types
frontend/node_modules/sucrase/dist/transformers/JSXTransformer.js (Line 519:10 - Line 560:8), frontend/node_modules/sucrase/dist/esm/transformers/JSXTransformer.js (Line 519:3 - Line 567:4)
.jsxEmptyText)) {
didEmitElement = this.processChildTextElement(needsComma);
} else {
throw new Error("Unexpected token when processing JSX children.");
}
if (didEmitElement) {
needsComma = true;
}
}
}
/**
* Turn a JSX text element into a string literal, or nothing at all if the JSX
* text resolves to the empty string.
*
* Returns true if a string literal is emitted, false otherwise.
*/
processChildTextElement(needsComma) {
const token = this.tokens.currentToken();
const valueCode = this.tokens.code.slice(token.start, token.end);
const replacementCode = formatJSXTextReplacement(valueCode);
const literalCode = formatJSXTextLiteral(valueCode);
if (literalCode === '""') {
this.tokens.replaceToken(replacementCode);
return false;
} else {
this.tokens.replaceToken(`${needsComma ? ", " : ""}${literalCode}${replacementCode}`);
return true;
}
}
getDevSource(elementLocationCode) {
return `{fileName: ${this.getFilenameVarName()}, ${elementLocationCode}}`;
}
getFilenameVarName() {
if (!this.filenameVarName) {
this.filenameVarName = this.nameManager.claimFreeName("_jsxFileName");
}
return this.filenameVarName;
}
} exports
frontend/node_modules/sucrase/dist/transformers/JSXTransformer.js (Line 573:1 - Line 710:8), frontend/node_modules/sucrase/dist/esm/transformers/JSXTransformer.js (Line 573:1 - Line 710:14)
/**
* Turn the given jsxText string into a JS string literal. Leading and trailing
* whitespace on lines is removed, except immediately after the open-tag and
* before the close-tag. Empty lines are completely removed, and spaces are
* added between lines after that.
*
* We use JSON.stringify to introduce escape characters as necessary, and trim
* the start and end of each line and remove blank lines.
*/
function formatJSXTextLiteral(text) {
let result = "";
let whitespace = "";
let isInInitialLineWhitespace = false;
let seenNonWhitespace = false;
for (let i = 0; i < text.length; i++) {
const c = text[i];
if (c === " " || c === "\t" || c === "\r") {
if (!isInInitialLineWhitespace) {
whitespace += c;
}
} else if (c === "\n") {
whitespace = "";
isInInitialLineWhitespace = true;
} else {
if (seenNonWhitespace && isInInitialLineWhitespace) {
result += " ";
}
result += whitespace;
whitespace = "";
if (c === "&") {
const {entity, newI} = processEntity(text, i + 1);
i = newI - 1;
result += entity;
} else {
result += c;
}
seenNonWhitespace = true;
isInInitialLineWhitespace = false;
}
}
if (!isInInitialLineWhitespace) {
result += whitespace;
}
return JSON.stringify(result);
}
/**
* Produce the code that should be printed after the JSX text string literal,
* with most content removed, but all newlines preserved and all spacing at the
* end preserved.
*/
function formatJSXTextReplacement(text) {
let numNewlines = 0;
let numSpaces = 0;
for (const c of text) {
if (c === "\n") {
numNewlines++;
numSpaces = 0;
} else if (c === " ") {
numSpaces++;
}
}
return "\n".repeat(numNewlines) + " ".repeat(numSpaces);
}
/**
* Format a string in the value position of a JSX prop.
*
* Use the same implementation as convertAttribute from
* babel-helper-builder-react-jsx.
*/
function formatJSXStringValueLiteral(text) {
let result = "";
for (let i = 0; i < text.length; i++) {
const c = text[i];
if (c === "\n") {
if (/\s/.test(text[i + 1])) {
result += " ";
while (i < text.length && /\s/.test(text[i + 1])) {
i++;
}
} else {
result += "\n";
}
} else if (c === "&") {
const {entity, newI} = processEntity(text, i + 1);
result += entity;
i = newI - 1;
} else {
result += c;
}
}
return JSON.stringify(result);
}
/**
* Starting at a &, see if there's an HTML entity (specified by name, decimal
* char code, or hex char code) and return it if so.
*
* Modified from jsxReadString in babel-parser.
*/
function processEntity(text, indexAfterAmpersand) {
let str = "";
let count = 0;
let entity;
let i = indexAfterAmpersand;
if (text[i] === "#") {
let radix = 10;
i++;
let numStart;
if (text[i] === "x") {
radix = 16;
i++;
numStart = i;
while (i < text.length && isHexDigit(text.charCodeAt(i))) {
i++;
}
} else {
numStart = i;
while (i < text.length && isDecimalDigit(text.charCodeAt(i))) {
i++;
}
}
if (text[i] === ";") {
const numStr = text.slice(numStart, i);
if (numStr) {
i++;
entity = String.fromCodePoint(parseInt(numStr, radix));
}
}
} else {
while (i < text.length && count++ < 10) {
const ch = text[i];
i++;
if (ch === ";") {
entity = _xhtml2
frontend/node_modules/sucrase/dist/transformers/JSXTransformer.js (Line 710:8 - Line 724:11), frontend/node_modules/sucrase/dist/esm/transformers/JSXTransformer.js (Line 710:14 - Line 724:10)
frontend/node_modules/sucrase/dist/transformers/FlowTransformer.js (Line 32:10 - Line 130:7), frontend/node_modules/sucrase/dist/esm/transformers/FlowTransformer.js (Line 32:3 - Line 130:3)
._enum)) {
this.processDefaultExportEnum();
return true;
}
return false;
}
/**
* Handle a declaration like:
* export enum E ...
*
* With this imports transform, this becomes:
* const E = [[enum]]; exports.E = E;
*
* otherwise, it becomes:
* export const E = [[enum]];
*/
processNamedExportEnum() {
if (this.isImportsTransformEnabled) {
// export
this.tokens.removeInitialToken();
const enumName = this.tokens.identifierNameAtRelativeIndex(1);
this.processEnum();
this.tokens.appendCode(` exports.${enumName} = ${enumName};`);
} else {
this.tokens.copyToken();
this.processEnum();
}
}
/**
* Handle a declaration like:
* export default enum E
*
* With the imports transform, this becomes:
* const E = [[enum]]; exports.default = E;
*
* otherwise, it becomes:
* const E = [[enum]]; export default E;
*/
processDefaultExportEnum() {
// export
this.tokens.removeInitialToken();
// default
this.tokens.removeToken();
const enumName = this.tokens.identifierNameAtRelativeIndex(1);
this.processEnum();
if (this.isImportsTransformEnabled) {
this.tokens.appendCode(` exports.default = ${enumName};`);
} else {
this.tokens.appendCode(` export default ${enumName};`);
}
}
/**
* Transpile flow enums to invoke the "flow-enums-runtime" library.
*
* Currently, the transpiled code always uses `require("flow-enums-runtime")`,
* but if future flexibility is needed, we could expose a config option for
* this string (similar to configurable JSX). Even when targeting ESM, the
* default behavior of babel-plugin-transform-flow-enums is to use require
* rather than injecting an import.
*
* Flow enums are quite a bit simpler than TS enums and have some convenient
* constraints:
* - Element initializers must be either always present or always absent. That
* means that we can use fixed lookahead on the first element (if any) and
* assume that all elements are like that.
* - The right-hand side of an element initializer must be a literal value,
* not a complex expression and not referencing other elements. That means
* we can simply copy a single token.
*
* Enums can be broken up into three basic cases:
*
* Mirrored enums:
* enum E {A, B}
* ->
* const E = require("flow-enums-runtime").Mirrored(["A", "B"]);
*
* Initializer enums:
* enum E {A = 1, B = 2}
* ->
* const E = require("flow-enums-runtime")({A: 1, B: 2});
*
* Symbol enums:
* enum E of symbol {A, B}
* ->
* const E = require("flow-enums-runtime")({A: Symbol("A"), B: Symbol("B")});
*
* We can statically detect which of the three cases this is by looking at the
* "of" declaration (if any) and seeing if the first element has an initializer.
* Since the other transform details are so similar between the three cases, we
* use a single implementation and vary the transform within processEnumElement
* based on case.
*/
processEnum() {
// enum E -> const E
this.tokens.replaceToken("const");
this.tokens.copyExpectedToken(_types
frontend/node_modules/sucrase/dist/transformers/FlowTransformer.js (Line 151:10 - Line 182:2), frontend/node_modules/sucrase/dist/esm/transformers/FlowTransformer.js (Line 151:3 - Line 182:2)
.comma)) {
this.tokens.copyToken();
}
}
this.tokens.replaceToken(isMirrored ? "]);" : "});");
}
/**
* Process an individual enum element, producing either an array element or an
* object element based on what type of enum this is.
*/
processEnumElement(isSymbolEnum, hasInitializers) {
if (isSymbolEnum) {
// Symbol enums never have initializers and are expanded to object elements.
// A, -> A: Symbol("A"),
const elementName = this.tokens.identifierName();
this.tokens.copyToken();
this.tokens.appendCode(`: Symbol("${elementName}")`);
} else if (hasInitializers) {
// Initializers are expanded to object elements.
// A = 1, -> A: 1,
this.tokens.copyToken();
this.tokens.replaceTokenTrimmingLeftWhitespace(":");
this.tokens.copyToken();
} else {
// Enum elements without initializers become string literal array elements.
// A, -> "A",
this.tokens.replaceToken(`"${this.tokens.identifierName()}"`);
}
}
}
frontend/node_modules/sucrase/dist/transformers/ESMImportTransformer.js (Line 1:1 - Line 7:19), frontend/node_modules/sucrase/dist/transformers/RootTransformer.js (Line 1:1 - Line 7:14)
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var _keywords = require('../parser/tokenizer/keywords');
var _types = require('../parser/tokenizer/types');
var _elideImportEquals
frontend/node_modules/sucrase/dist/transformers/ESMImportTransformer.js (Line 24:2 - Line 42:23), frontend/node_modules/sucrase/dist/esm/transformers/ESMImportTransformer.js (Line 24:2 - Line 42:22)
frontend/node_modules/sucrase/dist/transformers/ESMImportTransformer.js (Line 58:2 - Line 68:7), frontend/node_modules/sucrase/dist/esm/transformers/ESMImportTransformer.js (Line 58:2 - Line 68:3)
ContextualKeyword._type)
) {
// import type T = require('T')
this.tokens.removeInitialToken();
// This construct is always exactly 8 tokens long, so remove the 7 remaining tokens.
for (let i = 0; i < 7; i++) {
this.tokens.removeToken();
}
return true;
}
if (this.tokens.matches2(_types
frontend/node_modules/sucrase/dist/transformers/ESMImportTransformer.js (Line 74:2 - Line 84:7), frontend/node_modules/sucrase/dist/esm/transformers/ESMImportTransformer.js (Line 74:2 - Line 84:3)
ContextualKeyword._type)
) {
// export import type T = require('T')
this.tokens.removeInitialToken();
// This construct is always exactly 9 tokens long, so remove the 8 remaining tokens.
for (let i = 0; i < 8; i++) {
this.tokens.removeToken();
}
return true;
}
if (this.tokens.matches1(_types
frontend/node_modules/sucrase/dist/transformers/ESMImportTransformer.js (Line 137:2 - Line 157:7), frontend/node_modules/sucrase/dist/esm/transformers/ESMImportTransformer.js (Line 137:2 - Line 157:3)
this.tokens);
} else if (this.injectCreateRequireForImportRequire) {
// We're using require in an environment (Node ESM) that doesn't provide
// it as a global, so generate a helper to import it.
// import -> const
this.tokens.replaceToken("const");
// Foo
this.tokens.copyToken();
// =
this.tokens.copyToken();
// require
this.tokens.replaceToken(this.helperManager.getHelperName("require"));
} else {
// Otherwise, just switch `import` to `const`.
this.tokens.replaceToken("const");
}
return true;
}
processImport() {
if (this.tokens.matches2(_types
frontend/node_modules/sucrase/dist/transformers/ESMImportTransformer.js (Line 157:10 - Line 166:7), frontend/node_modules/sucrase/dist/esm/transformers/ESMImportTransformer.js (Line 157:3 - Line 166:3)
.parenL)) {
// Dynamic imports don't need to be transformed.
return false;
}
const snapshot = this.tokens.snapshot();
const allImportsRemoved = this.removeImportTypeBindings();
if (allImportsRemoved) {
this.tokens.restoreToSnapshot(snapshot);
while (!this.tokens.matches1(_types
frontend/node_modules/sucrase/dist/transformers/ESMImportTransformer.js (Line 238:10 - Line 248:7), frontend/node_modules/sucrase/dist/esm/transformers/ESMImportTransformer.js (Line 238:3 - Line 248:3)
.star)) {
if (this.shouldAutomaticallyElideImportedName(this.tokens.identifierNameAtRelativeIndex(2))) {
this.tokens.removeToken();
this.tokens.removeToken();
this.tokens.removeToken();
} else {
if (needsComma) {
this.tokens.appendCode(",");
}
foundNonTypeImport = true;
this.tokens.copyExpectedToken(_types
frontend/node_modules/sucrase/dist/transformers/ESMImportTransformer.js (Line 259:2 - Line 267:7), frontend/node_modules/sucrase/dist/esm/transformers/ESMImportTransformer.js (Line 259:2 - Line 267:3)
this.tokens);
if (
specifierInfo.isType ||
this.shouldAutomaticallyElideImportedName(specifierInfo.rightName)
) {
while (this.tokens.currentIndex() < specifierInfo.endIndex) {
this.tokens.removeToken();
}
if (this.tokens.matches1(_types
frontend/node_modules/sucrase/dist/transformers/ESMImportTransformer.js (Line 267:10 - Line 275:7), frontend/node_modules/sucrase/dist/esm/transformers/ESMImportTransformer.js (Line 267:3 - Line 275:3)
.comma)) {
this.tokens.removeToken();
}
} else {
foundNonTypeImport = true;
while (this.tokens.currentIndex() < specifierInfo.endIndex) {
this.tokens.copyToken();
}
if (this.tokens.matches1(_types
frontend/node_modules/sucrase/dist/transformers/ESMImportTransformer.js (Line 280:10 - Line 306:27), frontend/node_modules/sucrase/dist/esm/transformers/ESMImportTransformer.js (Line 280:3 - Line 306:25)
.braceR);
}
if (this.keepUnusedImports) {
return false;
}
if (this.isTypeScriptTransformEnabled) {
return !foundNonTypeImport;
} else if (this.isFlowTransformEnabled) {
// In Flow, unlike TS, `import {} from 'foo';` preserves the import.
return foundAnyNamedImport && !foundNonTypeImport;
} else {
return false;
}
}
shouldAutomaticallyElideImportedName(name) {
return (
this.isTypeScriptTransformEnabled &&
!this.keepUnusedImports &&
!this.nonTypeIdentifiers.has(name)
);
}
processExportDefault() {
if (
_shouldElideDefaultExport2
frontend/node_modules/sucrase/dist/transformers/ESMImportTransformer.js (Line 307:9 - Line 323:7), frontend/node_modules/sucrase/dist/esm/transformers/ESMImportTransformer.js (Line 307:9 - Line 323:3)
this.isTypeScriptTransformEnabled,
this.keepUnusedImports,
this.tokens,
this.declarationInfo,
)
) {
// If the exported value is just an identifier and should be elided by TypeScript
// rules, then remove it entirely. It will always have the form `export default e`,
// where `e` is an identifier.
this.tokens.removeInitialToken();
this.tokens.removeToken();
this.tokens.removeToken();
return true;
}
const alreadyHasName =
this.tokens.matches4(_types
frontend/node_modules/sucrase/dist/transformers/ESMImportTransformer.js (Line 331:10 - Line 360:7), frontend/node_modules/sucrase/dist/esm/transformers/ESMImportTransformer.js (Line 331:3 - Line 360:3)
.name);
if (!alreadyHasName && this.reactHotLoaderTransformer) {
// This is a plain "export default E" statement and we need to assign E to a variable.
// Change "export default E" to "let _default; export default _default = E"
const defaultVarName = this.nameManager.claimFreeName("_default");
this.tokens.replaceToken(`let ${defaultVarName}; export`);
this.tokens.copyToken();
this.tokens.appendCode(` ${defaultVarName} =`);
this.reactHotLoaderTransformer.setExtractedDefaultExportName(defaultVarName);
return true;
}
return false;
}
/**
* Handle a statement with one of these forms:
* export {a, type b};
* export {c, type d} from 'foo';
*
* In both cases, any explicit type exports should be removed. In the first
* case, we also need to handle implicit export elision for names declared as
* types. In the second case, we must NOT do implicit named export elision,
* but we must remove the runtime import if all exports are type exports.
*/
processNamedExports() {
if (!this.isTypeScriptTransformEnabled) {
return false;
}
this.tokens.copyExpectedToken(_types
frontend/node_modules/sucrase/dist/transformers/ESMImportTransformer.js (Line 366:2 - Line 375:7), frontend/node_modules/sucrase/dist/esm/transformers/ESMImportTransformer.js (Line 366:2 - Line 375:3)
this.tokens);
if (
specifierInfo.isType ||
(!isReExport && this.shouldElideExportedName(specifierInfo.leftName))
) {
// Type export, so remove all tokens, including any comma.
while (this.tokens.currentIndex() < specifierInfo.endIndex) {
this.tokens.removeToken();
}
if (this.tokens.matches1(_types
frontend/node_modules/sucrase/dist/transformers/ESMImportTransformer.js (Line 372:9 - Line 379:61), frontend/node_modules/sucrase/dist/transformers/ESMImportTransformer.js (Line 264:11 - Line 271:19)
while (this.tokens.currentIndex() < specifierInfo.endIndex) {
this.tokens.removeToken();
}
if (this.tokens.matches1(_types.TokenType.comma)) {
this.tokens.removeToken();
}
} else {
// Non-type export, so copy all tokens, including any comma.
frontend/node_modules/sucrase/dist/transformers/ESMImportTransformer.js (Line 375:10 - Line 384:7), frontend/node_modules/sucrase/dist/esm/transformers/ESMImportTransformer.js (Line 375:3 - Line 384:3)
.comma)) {
this.tokens.removeToken();
}
} else {
// Non-type export, so copy all tokens, including any comma.
foundNonTypeExport = true;
while (this.tokens.currentIndex() < specifierInfo.endIndex) {
this.tokens.copyToken();
}
if (this.tokens.matches1(_types
frontend/node_modules/sucrase/dist/transformers/ESMImportTransformer.js (Line 380:2 - Line 391:3), frontend/node_modules/sucrase/dist/transformers/ESMImportTransformer.js (Line 271:2 - Line 281:2)
= true;
while (this.tokens.currentIndex() < specifierInfo.endIndex) {
this.tokens.copyToken();
}
if (this.tokens.matches1(_types.TokenType.comma)) {
this.tokens.copyToken();
}
}
}
this.tokens.copyExpectedToken(_types.TokenType.braceR);
if
frontend/node_modules/sucrase/dist/transformers/ESMImportTransformer.js (Line 396:2 - Line 415:2), frontend/node_modules/sucrase/dist/esm/transformers/ESMImportTransformer.js (Line 396:2 - Line 415:2)
this.tokens);
}
return true;
}
/**
* ESM elides all imports with the rule that we only elide if we see that it's
* a type and never see it as a value. This is in contrast to CJS, which
* elides imports that are completely unknown.
*/
shouldElideExportedName(name) {
return (
this.isTypeScriptTransformEnabled &&
!this.keepUnusedImports &&
this.declarationInfo.typeDeclarations.has(name) &&
!this.declarationInfo.valueDeclarations.has(name)
);
}
}
frontend/node_modules/sucrase/dist/transformers/CJSImportTransformer.js (Line 5:1 - Line 14:14), frontend/node_modules/sucrase/dist/transformers/ESMImportTransformer.js (Line 4:1 - Line 13:23)
var _keywords = require('../parser/tokenizer/keywords');
var _types = require('../parser/tokenizer/types');
var _elideImportEquals = require('../util/elideImportEquals'); var _elideImportEquals2 = _interopRequireDefault(_elideImportEquals);
var _getDeclarationInfo = require('../util/getDeclarationInfo'); var _getDeclarationInfo2 = _interopRequireDefault(_getDeclarationInfo);
var _getImportExportSpecifierInfo = require('../util/getImportExportSpecifierInfo'); var _getImportExportSpecifierInfo2 = _interopRequireDefault(_getImportExportSpecifierInfo);
var _isExportFrom
frontend/node_modules/sucrase/dist/transformers/CJSImportTransformer.js (Line 13:30 - Line 23:4), frontend/node_modules/sucrase/dist/transformers/ESMImportTransformer.js (Line 13:32 - Line 23:4)
);
var _isExportFrom = require('../util/isExportFrom'); var _isExportFrom2 = _interopRequireDefault(_isExportFrom);
var _removeMaybeImportAttributes = require('../util/removeMaybeImportAttributes');
var _shouldElideDefaultExport = require('../util/shouldElideDefaultExport'); var _shouldElideDefaultExport2 = _interopRequireDefault(_shouldElideDefaultExport);
var _Transformer = require('./Transformer'); var _Transformer2 = _interopRequireDefault(_Transformer);
/**
* Class for editing import statements when we are transforming to commonjs.
*/
frontend/node_modules/sucrase/dist/transformers/CJSImportTransformer.js (Line 24:2 - Line 46:21), frontend/node_modules/sucrase/dist/esm/transformers/CJSImportTransformer.js (Line 24:2 - Line 46:19)
frontend/node_modules/sucrase/dist/transformers/CJSImportTransformer.js (Line 47:2 - Line 67:7), frontend/node_modules/sucrase/dist/esm/transformers/CJSImportTransformer.js (Line 47:2 - Line 67:3)
EMPTY_DECLARATION_INFO;
}
getPrefixCode() {
let prefix = "";
if (this.hadExport) {
prefix += 'Object.defineProperty(exports, "__esModule", {value: true});';
}
return prefix;
}
getSuffixCode() {
if (this.enableLegacyBabel5ModuleInterop && this.hadDefaultExport && !this.hadNamedExport) {
return "\nmodule.exports = exports.default;\n";
}
return "";
}
process() {
// TypeScript `import foo = require('foo');` should always just be translated to plain require.
if (this.tokens.matches3(_types
frontend/node_modules/sucrase/dist/transformers/CJSImportTransformer.js (Line 97:10 - Line 107:20), frontend/node_modules/sucrase/dist/esm/transformers/CJSImportTransformer.js (Line 97:3 - Line 107:18)
.preIncDec)) {
return this.processPreIncDec();
}
return false;
}
processImportEquals() {
const importName = this.tokens.identifierNameAtIndex(this.tokens.currentIndex() + 1);
if (this.importProcessor.shouldAutomaticallyElideImportedName(importName)) {
// If this name is only used as a type, elide the whole import.
_elideImportEquals2
frontend/node_modules/sucrase/dist/transformers/CJSImportTransformer.js (Line 125:10 - Line 140:7), frontend/node_modules/sucrase/dist/esm/transformers/CJSImportTransformer.js (Line 125:3 - Line 140:3)
.parenL)) {
if (this.preserveDynamicImport) {
// Bail out, only making progress for this one token.
this.tokens.copyToken();
return;
}
const requireWrapper = this.enableLegacyTypeScriptModuleInterop
? ""
: `${this.helperManager.getHelperName("interopRequireWildcard")}(`;
this.tokens.replaceToken(`Promise.resolve().then(() => ${requireWrapper}require`);
const contextId = this.tokens.currentToken().contextId;
if (contextId == null) {
throw new Error("Expected context ID on dynamic import invocation.");
}
this.tokens.copyToken();
while (!this.tokens.matchesContextIdAndLabel(_types
frontend/node_modules/sucrase/dist/transformers/CJSImportTransformer.js (Line 140:10 - Line 155:29), frontend/node_modules/sucrase/dist/esm/transformers/CJSImportTransformer.js (Line 140:3 - Line 155:28)
frontend/node_modules/sucrase/dist/transformers/CJSImportTransformer.js (Line 179:2 - Line 186:5), frontend/node_modules/sucrase/dist/transformers/ESMImportTransformer.js (Line 185:8 - Line 192:7)
);
if (
this.tokens.matchesContextual(_keywords.ContextualKeyword._type) &&
!this.tokens.matches1AtIndex(this.tokens.currentIndex() + 1, _types.TokenType.comma) &&
!this.tokens.matchesContextualAtIndex(this.tokens.currentIndex() + 1, _keywords.ContextualKeyword._from)
) {
// This is an "import type" statement, so exit early.
this
frontend/node_modules/sucrase/dist/transformers/CJSImportTransformer.js (Line 219:10 - Line 240:7), frontend/node_modules/sucrase/dist/esm/transformers/CJSImportTransformer.js (Line 219:3 - Line 240:3)
.braceR)
) {
foundNonTypeImport = true;
}
}
this.tokens.removeToken();
}
if (this.keepUnusedImports) {
return false;
}
if (this.isTypeScriptTransformEnabled) {
return !foundNonTypeImport;
} else if (this.isFlowTransformEnabled) {
// In Flow, unlike TS, `import {} from 'foo';` preserves the import.
return foundAnyNamedImport && !foundNonTypeImport;
} else {
return false;
}
}
removeRemainingImport() {
while (!this.tokens.matches1(_types
frontend/node_modules/sucrase/dist/transformers/CJSImportTransformer.js (Line 255:2 - Line 269:7), frontend/node_modules/sucrase/dist/esm/transformers/CJSImportTransformer.js (Line 255:2 - Line 269:3)
IdentifierRole.Access) {
return false;
}
const replacement = this.importProcessor.getIdentifierReplacement(
this.tokens.identifierNameForToken(token),
);
if (!replacement) {
return false;
}
// Tolerate any number of closing parens while looking for an opening paren
// that indicates a function call.
let possibleOpenParenIndex = this.tokens.currentIndex() + 1;
while (
possibleOpenParenIndex < this.tokens.tokens.length &&
this.tokens.tokens[possibleOpenParenIndex].type === _types
frontend/node_modules/sucrase/dist/transformers/CJSImportTransformer.js (Line 287:10 - Line 310:7), frontend/node_modules/sucrase/dist/esm/transformers/CJSImportTransformer.js (Line 287:3 - Line 310:3)
frontend/node_modules/sucrase/dist/transformers/CJSImportTransformer.js (Line 329:2 - Line 366:5), frontend/node_modules/sucrase/dist/transformers/ESMImportTransformer.js (Line 93:5 - Line 130:7)
if (
this.tokens.matches2(_types.TokenType._export, _types.TokenType.name) &&
this.tokens.matchesContextualAtIndex(this.tokens.currentIndex() + 1, _keywords.ContextualKeyword._type)
) {
// export type {a};
// export type {a as b};
// export type {a} from './b';
// export type * from './b';
// export type * as ns from './b';
this.tokens.removeInitialToken();
this.tokens.removeToken();
if (this.tokens.matches1(_types.TokenType.braceL)) {
while (!this.tokens.matches1(_types.TokenType.braceR)) {
this.tokens.removeToken();
}
this.tokens.removeToken();
} else {
// *
this.tokens.removeToken();
if (this.tokens.matches1(_types.TokenType._as)) {
// as
this.tokens.removeToken();
// ns
this.tokens.removeToken();
}
}
// Remove type re-export `... } from './T'`
if (
this.tokens.matchesContextual(_keywords.ContextualKeyword._from) &&
this.tokens.matches1AtIndex(this.tokens.currentIndex() + 1, _types.TokenType.string)
) {
this.tokens.removeToken();
this.tokens.removeToken();
_removeMaybeImportAttributes.removeMaybeImportAttributes.call(void 0, this.tokens);
}
return true;
}
this
frontend/node_modules/sucrase/dist/transformers/CJSImportTransformer.js (Line 388:10 - Line 401:7), frontend/node_modules/sucrase/dist/esm/transformers/CJSImportTransformer.js (Line 388:3 - Line 401:3)
.star)) {
this.processExportStar();
return true;
} else {
throw new Error("Unrecognized export syntax.");
}
}
processAssignment() {
const index = this.tokens.currentIndex();
const identifierToken = this.tokens.tokens[index - 1];
// If the LHS is a type identifier, this must be a declaration like `let a: b = c;`,
// with `b` as the identifier, so nothing needs to be done in that case.
if (identifierToken.isType || identifierToken.type !== _types
frontend/node_modules/sucrase/dist/transformers/CJSImportTransformer.js (Line 410:10 - Line 433:7), frontend/node_modules/sucrase/dist/esm/transformers/CJSImportTransformer.js (Line 410:3 - Line 433:3)
._const].includes(this.tokens.tokens[index - 2].type)) {
// Declarations don't need an extra assignment. This doesn't avoid the
// assignment for comma-separated declarations, but it's still correct
// since the assignment is just redundant.
return false;
}
const assignmentSnippet = this.importProcessor.resolveExportBinding(
this.tokens.identifierNameForToken(identifierToken),
);
if (!assignmentSnippet) {
return false;
}
this.tokens.copyToken();
this.tokens.appendCode(` ${assignmentSnippet} =`);
return true;
}
/**
* Process something like `a += 3`, where `a` might be an exported value.
*/
processComplexAssignment() {
const index = this.tokens.currentIndex();
const identifierToken = this.tokens.tokens[index - 1];
if (identifierToken.type !== _types
frontend/node_modules/sucrase/dist/transformers/CJSImportTransformer.js (Line 433:2 - Line 442:6), frontend/node_modules/sucrase/dist/transformers/CJSImportTransformer.js (Line 401:2 - Line 410:3)
frontend/node_modules/sucrase/dist/transformers/CJSImportTransformer.js (Line 529:2 - Line 539:7), frontend/node_modules/sucrase/dist/esm/transformers/CJSImportTransformer.js (Line 529:11 - Line 539:3)
ContextualKeyword._async,
))
) {
this.tokens.removeInitialToken();
this.tokens.removeToken();
// Named function export case: change it to a top-level function
// declaration followed by exports statement.
const name = this.processNamedFunction();
this.tokens.appendCode(` exports.default = ${name};`);
} else if (
this.tokens.matches4(_types
frontend/node_modules/sucrase/dist/transformers/CJSImportTransformer.js (Line 554:9 - Line 587:7), frontend/node_modules/sucrase/dist/esm/transformers/CJSImportTransformer.js (Line 554:9 - Line 587:3)
this.isTypeScriptTransformEnabled,
this.keepUnusedImports,
this.tokens,
this.declarationInfo,
)
) {
// If the exported value is just an identifier and should be elided by TypeScript
// rules, then remove it entirely. It will always have the form `export default e`,
// where `e` is an identifier.
exportedRuntimeValue = false;
this.tokens.removeInitialToken();
this.tokens.removeToken();
this.tokens.removeToken();
} else if (this.reactHotLoaderTransformer) {
// We need to assign E to a variable. Change "export default E" to
// "let _default; exports.default = _default = E"
const defaultVarName = this.nameManager.claimFreeName("_default");
this.tokens.replaceToken(`let ${defaultVarName}; exports.`);
this.tokens.copyToken();
this.tokens.appendCode(` = ${defaultVarName} =`);
this.reactHotLoaderTransformer.setExtractedDefaultExportName(defaultVarName);
} else {
// Change "export default E" to "exports.default = E"
this.tokens.replaceToken("exports.");
this.tokens.copyToken();
this.tokens.appendCode(" =");
}
if (exportedRuntimeValue) {
this.hadDefaultExport = true;
}
}
copyDecorators() {
while (this.tokens.matches1(_types
frontend/node_modules/sucrase/dist/transformers/CJSImportTransformer.js (Line 599:9 - Line 604:2), frontend/node_modules/sucrase/dist/transformers/CJSImportTransformer.js (Line 589:7 - Line 593:5)
if (this.tokens.matches1(_types.TokenType.parenL)) {
this.tokens.copyExpectedToken(_types.TokenType.parenL);
this.rootTransformer.processBalancedCode();
this.tokens.copyExpectedToken(_types.TokenType.parenR);
}
}
frontend/node_modules/sucrase/dist/transformers/CJSImportTransformer.js (Line 602:10 - Line 630:7), frontend/node_modules/sucrase/dist/esm/transformers/CJSImportTransformer.js (Line 602:3 - Line 630:3)
.parenR);
}
}
}
}
/**
* Transform a declaration like `export var`, `export let`, or `export const`.
*/
processExportVar() {
if (this.isSimpleExportVar()) {
this.processSimpleExportVar();
} else {
this.processComplexExportVar();
}
}
/**
* Determine if the export is of the form:
* export var/let/const [varName] = [expr];
* In other words, determine if function name inference might apply.
*/
isSimpleExportVar() {
let tokenIndex = this.tokens.currentIndex();
// export
tokenIndex++;
// var/let/const
tokenIndex++;
if (!this.tokens.matches1AtIndex(tokenIndex, _types
frontend/node_modules/sucrase/dist/transformers/CJSImportTransformer.js (Line 630:10 - Line 637:7), frontend/node_modules/sucrase/dist/esm/transformers/CJSImportTransformer.js (Line 630:3 - Line 637:3)
.name)) {
return false;
}
tokenIndex++;
while (tokenIndex < this.tokens.tokens.length && this.tokens.tokens[tokenIndex].isType) {
tokenIndex++;
}
if (!this.tokens.matches1AtIndex(tokenIndex, _types
frontend/node_modules/sucrase/dist/transformers/CJSImportTransformer.js (Line 637:10 - Line 663:7), frontend/node_modules/sucrase/dist/esm/transformers/CJSImportTransformer.js (Line 637:3 - Line 663:3)
.eq)) {
return false;
}
return true;
}
/**
* Transform an `export var` declaration initializing a single variable.
*
* For example, this:
* export const f = () => {};
* becomes this:
* const f = () => {}; exports.f = f;
*
* The variable is unused (e.g. exports.f has the true value of the export).
* We need to produce an assignment of this form so that the function will
* have an inferred name of "f", which wouldn't happen in the more general
* case below.
*/
processSimpleExportVar() {
// export
this.tokens.removeInitialToken();
// var/let/const
this.tokens.copyToken();
const varName = this.tokens.identifierName();
// x: number -> x
while (!this.tokens.matches1(_types
frontend/node_modules/sucrase/dist/transformers/CJSImportTransformer.js (Line 663:10 - Line 686:7), frontend/node_modules/sucrase/dist/esm/transformers/CJSImportTransformer.js (Line 663:3 - Line 686:3)
.eq)) {
this.rootTransformer.processToken();
}
const endIndex = this.tokens.currentToken().rhsEndIndex;
if (endIndex == null) {
throw new Error("Expected = token with an end index.");
}
while (this.tokens.currentIndex() < endIndex) {
this.rootTransformer.processToken();
}
this.tokens.appendCode(`; exports.${varName} = ${varName}`);
}
/**
* Transform normal declaration exports, including handling destructuring.
* For example, this:
* export const {x: [a = 2, b], c} = d;
* becomes this:
* ({x: [exports.a = 2, exports.b], c: exports.c} = d;)
*/
processComplexExportVar() {
this.tokens.removeInitialToken();
this.tokens.removeToken();
const needsParens = this.tokens.matches1(_types
frontend/node_modules/sucrase/dist/transformers/CJSImportTransformer.js (Line 709:10 - Line 721:11), frontend/node_modules/sucrase/dist/esm/transformers/CJSImportTransformer.js (Line 709:3 - Line 721:14)
.eq)) {
// Default values might have assignments in the RHS that we want to ignore, so skip past
// them.
const endIndex = this.tokens.currentToken().rhsEndIndex;
if (endIndex == null) {
throw new Error("Expected = token with an end index.");
}
while (this.tokens.currentIndex() < endIndex) {
this.rootTransformer.processToken();
}
} else {
const token = this.tokens.currentToken();
if (_tokenizer
frontend/node_modules/sucrase/dist/transformers/CJSImportTransformer.js (Line 727:2 - Line 766:7), frontend/node_modules/sucrase/dist/esm/transformers/CJSImportTransformer.js (Line 727:2 - Line 766:3)
token)) {
replacement = `${name}: ${replacement}`;
}
this.tokens.replaceToken(replacement);
} else {
this.rootTransformer.processToken();
}
}
}
if (needsParens) {
// Seek to the end of the RHS.
const endIndex = this.tokens.currentToken().rhsEndIndex;
if (endIndex == null) {
throw new Error("Expected = token with an end index.");
}
while (this.tokens.currentIndex() < endIndex) {
this.rootTransformer.processToken();
}
this.tokens.appendCode(")");
}
}
/**
* Transform this:
* export function foo() {}
* into this:
* function foo() {} exports.foo = foo;
*/
processExportFunction() {
this.tokens.replaceToken("");
const name = this.processNamedFunction();
this.tokens.appendCode(` exports.${name} = ${name};`);
}
/**
* Skip past a function with a name and return that name.
*/
processNamedFunction() {
if (this.tokens.matches1(_types
frontend/node_modules/sucrase/dist/transformers/CJSImportTransformer.js (Line 778:10 - Line 789:7), frontend/node_modules/sucrase/dist/esm/transformers/CJSImportTransformer.js (Line 778:3 - Line 789:3)
.name)) {
throw new Error("Expected identifier for exported function name.");
}
const name = this.tokens.identifierName();
this.tokens.copyToken();
if (this.tokens.currentToken().isType) {
this.tokens.removeInitialToken();
while (this.tokens.currentToken().isType) {
this.tokens.removeToken();
}
}
this.tokens.copyExpectedToken(_types
frontend/node_modules/sucrase/dist/transformers/CJSImportTransformer.js (Line 806:19 - Line 812:11), frontend/node_modules/sucrase/dist/transformers/CJSImportTransformer.js (Line 544:12 - Line 550:21)
();
this.copyDecorators();
if (this.tokens.matches1(_types.TokenType._abstract)) {
this.tokens.removeToken();
}
const name = this.rootTransformer.processNamedClass();
this.tokens.appendCode(` exports.
frontend/node_modules/sucrase/dist/transformers/CJSImportTransformer.js (Line 808:10 - Line 834:15), frontend/node_modules/sucrase/dist/esm/transformers/CJSImportTransformer.js (Line 808:3 - Line 834:13)
._abstract)) {
this.tokens.removeToken();
}
const name = this.rootTransformer.processNamedClass();
this.tokens.appendCode(` exports.${name} = ${name};`);
}
/**
* Transform this:
* export {a, b as c};
* into this:
* exports.a = a; exports.c = b;
*
* OR
*
* Transform this:
* export {a, b as c} from './foo';
* into the pre-generated Object.defineProperty code from the ImportProcessor.
*
* For the first case, if the TypeScript transform is enabled, we need to skip
* exports that are only defined as types.
*/
processExportBindings() {
this.tokens.removeInitialToken();
this.tokens.removeToken();
const isReExport = _isExportFrom2
frontend/node_modules/sucrase/dist/transformers/CJSImportTransformer.js (Line 843:2 - Line 864:7), frontend/node_modules/sucrase/dist/esm/transformers/CJSImportTransformer.js (Line 843:2 - Line 864:3)
frontend/node_modules/sucrase/dist/esm/CJSImportProcessor.js (Line 325:7 - Line 333:13), frontend/node_modules/sucrase/dist/esm/CJSImportProcessor.js (Line 235:3 - Line 243:13)
;
}
if (!this.tokens.matches1AtIndex(index, tt.string)) {
throw new Error("Expected string token at the end of import statement.");
}
const path = this.tokens.stringValueAtIndex(index);
const importInfo = this.getImportInfo(path);
importInfo.namedExports
frontend/node_modules/postcss-selector-parser/dist/util/ensureObject.js (Line 5:13 - Line 12:4), frontend/node_modules/postcss-selector-parser/dist/util/getProp.js (Line 5:8 - Line 12:7)
(obj) {
for (var _len = arguments.length, props = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
props[_key - 1] = arguments[_key];
}
while (props.length > 0) {
var prop = props.shift();
if (!obj[prop]) {
obj
frontend/node_modules/postcss-selector-parser/dist/selectors/tag.js (Line 1:1 - Line 10:4), frontend/node_modules/postcss-selector-parser/dist/selectors/universal.js (Line 1:1 - Line 10:10)
"use strict";
exports.__esModule = true;
exports["default"] = void 0;
var _namespace = _interopRequireDefault(require("./namespace"));
var _types = require("./types");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
var Tag
frontend/node_modules/postcss-selector-parser/dist/selectors/string.js (Line 5:9 - Line 10:7), frontend/node_modules/postcss-selector-parser/dist/selectors/universal.js (Line 5:14 - Line 10:10)
));
var _types = require("./types");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
var String
frontend/node_modules/postcss-selector-parser/dist/selectors/selector.js (Line 5:14 - Line 10:9), frontend/node_modules/postcss-selector-parser/dist/selectors/universal.js (Line 5:14 - Line 10:10)
));
var _types = require("./types");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
var Selector
frontend/node_modules/postcss-selector-parser/dist/selectors/root.js (Line 1:1 - Line 8:18), frontend/node_modules/postcss-selector-parser/dist/selectors/selector.js (Line 1:1 - Line 8:15)
"use strict";
exports.__esModule = true;
exports["default"] = void 0;
var _container = _interopRequireDefault(require("./container"));
var _types = require("./types");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _defineProperties
frontend/node_modules/postcss-selector-parser/dist/selectors/pseudo.js (Line 1:1 - Line 10:7), frontend/node_modules/postcss-selector-parser/dist/selectors/selector.js (Line 1:1 - Line 10:10)
frontend/node_modules/autoprefixer/lib/hacks/autofill.js (Line 4:2 - Line 18:20), frontend/node_modules/autoprefixer/lib/hacks/file-selector-button.js (Line 4:2 - Line 18:31)
extends Selector {
constructor(name, prefixes, all) {
super(name, prefixes, all)
if (this.prefixes) {
this.prefixes = utils.uniq(this.prefixes.map(() => '-webkit-'))
}
}
/**
* Return different selectors depend on prefix
*/
prefixed(prefix) {
if (prefix === '-webkit-') {
return ':-webkit-autofill'
frontend/node_modules/@vitejs/plugin-react/dist/index.cjs (Line 2:1 - Line 9:4), frontend/shared/node_modules/typescript/lib/watchGuard.js (Line 18:1 - Line 25:2)
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") for
frontend/node_modules/@vitejs/plugin-react/dist/index.cjs (Line 12:2 - Line 18:11), frontend/node_modules/@tanstack/react-query/build/modern/useQueries.cjs (Line 17:2 - Line 22:71)
frontend/node_modules/zustand/vanilla/shallow.js (Line 1:1 - Line 75:2), frontend/node_modules/zustand/umd/vanilla/shallow.development.js (Line 5:2 - Line 79:2)
'use strict';
function _arrayLikeToArray(r, a) {
(null == a || a > r.length) && (a = r.length);
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
return n;
}
function _createForOfIteratorHelperLoose(r, e) {
var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
if (t) return (t = t.call(r)).next.bind(t);
if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e) {
t && (r = t);
var o = 0;
return function () {
return o >= r.length ? {
done: !0
} : {
done: !1,
value: r[o++]
};
};
}
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
function _unsupportedIterableToArray(r, a) {
if (r) {
if ("string" == typeof r) return _arrayLikeToArray(r, a);
var t = {}.toString.call(r).slice(8, -1);
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
}
}
function shallow(objA, objB) {
if (Object.is(objA, objB)) {
return true;
}
if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {
return false;
}
if (objA instanceof Map && objB instanceof Map) {
if (objA.size !== objB.size) return false;
for (var _iterator = _createForOfIteratorHelperLoose(objA), _step; !(_step = _iterator()).done;) {
var _step$value = _step.value,
key = _step$value[0],
value = _step$value[1];
if (!Object.is(value, objB.get(key))) {
return false;
}
}
return true;
}
if (objA instanceof Set && objB instanceof Set) {
if (objA.size !== objB.size) return false;
for (var _iterator2 = _createForOfIteratorHelperLoose(objA), _step2; !(_step2 = _iterator2()).done;) {
var _value = _step2.value;
if (!objB.has(_value)) {
return false;
}
}
return true;
}
var keysA = Object.keys(objA);
if (keysA.length !== Object.keys(objB).length) {
return false;
}
for (var _i = 0, _keysA = keysA; _i < _keysA.length; _i++) {
var keyA = _keysA[_i];
if (!Object.prototype.hasOwnProperty.call(objB, keyA) || !Object.is(objA[keyA], objB[keyA])) {
return false;
}
}
return true;
}
exports.shallow = shallow;
frontend/node_modules/zustand/umd/shallow.development.js (Line 4:2 - Line 37:10), frontend/node_modules/zustand/umd/vanilla/shallow.development.js (Line 4:2 - Line 37:8)
= {}));
})(this, (function (exports) { 'use strict';
function _arrayLikeToArray(r, a) {
(null == a || a > r.length) && (a = r.length);
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
return n;
}
function _createForOfIteratorHelperLoose(r, e) {
var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
if (t) return (t = t.call(r)).next.bind(t);
if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e) {
t && (r = t);
var o = 0;
return function () {
return o >= r.length ? {
done: !0
} : {
done: !1,
value: r[o++]
};
};
}
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
function _unsupportedIterableToArray(r, a) {
if (r) {
if ("string" == typeof r) return _arrayLikeToArray(r, a);
var t = {}.toString.call(r).slice(8, -1);
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
}
}
function shallow$1
frontend/node_modules/zustand/umd/shallow.development.js (Line 37:10 - Line 79:8), frontend/node_modules/zustand/umd/vanilla/shallow.development.js (Line 37:8 - Line 79:7)
(objA, objB) {
if (Object.is(objA, objB)) {
return true;
}
if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {
return false;
}
if (objA instanceof Map && objB instanceof Map) {
if (objA.size !== objB.size) return false;
for (var _iterator = _createForOfIteratorHelperLoose(objA), _step; !(_step = _iterator()).done;) {
var _step$value = _step.value,
key = _step$value[0],
value = _step$value[1];
if (!Object.is(value, objB.get(key))) {
return false;
}
}
return true;
}
if (objA instanceof Set && objB instanceof Set) {
if (objA.size !== objB.size) return false;
for (var _iterator2 = _createForOfIteratorHelperLoose(objA), _step2; !(_step2 = _iterator2()).done;) {
var _value = _step2.value;
if (!objB.has(_value)) {
return false;
}
}
return true;
}
var keysA = Object.keys(objA);
if (keysA.length !== Object.keys(objB).length) {
return false;
}
for (var _i = 0, _keysA = keysA; _i < _keysA.length; _i++) {
var keyA = _keysA[_i];
if (!Object.prototype.hasOwnProperty.call(objB, keyA) || !Object.is(objA[keyA], objB[keyA])) {
return false;
}
}
return true;
}
var shallow
frontend/node_modules/zustand/umd/middleware.development.js (Line 502:2 - Line 513:4), frontend/node_modules/zustand/umd/middleware.development.js (Line 387:9 - Line 398:4)
;
};
var savedSetState = api.setState;
api.setState = function (state, replace) {
savedSetState(state, replace);
void setItem();
};
var configResult = config(function () {
set.apply(void 0, arguments);
void setItem();
}, get, api);
api
frontend/node_modules/zustand/umd/middleware.development.js (Line 550:2 - Line 561:8), frontend/node_modules/zustand/umd/middleware.development.js (Line 428:2 - Line 439:11)
frontend/node_modules/zustand/umd/middleware.development.js (Line 576:14 - Line 591:3), frontend/node_modules/zustand/umd/middleware.development.js (Line 454:13 - Line 469:8)
;
},
onHydrate: function onHydrate(cb) {
hydrationListeners.add(cb);
return function () {
hydrationListeners.delete(cb);
};
},
onFinishHydration: function onFinishHydration(cb) {
finishHydrationListeners.add(cb);
return function () {
finishHydrationListeners.delete(cb);
};
}
};
if
frontend/node_modules/zustand/umd/context.development.js (Line 5:12 - Line 17:4), frontend/node_modules/zustand/umd/middleware.development.js (Line 5:8 - Line 16:9)
) { 'use strict';
function _extends() {
return _extends = Object.assign ? Object.assign.bind() : function (n) {
for (var e = 1; e < arguments.length; e++) {
var t = arguments[e];
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
}
return n;
}, _extends.apply(null, arguments);
}
var
frontend/node_modules/zustand/system/shallow.development.js (Line 8:10 - Line 45:4), frontend/node_modules/zustand/system/vanilla/shallow.development.js (Line 8:8 - Line 45:2)
(objA, objB) {
if (Object.is(objA, objB)) {
return true;
}
if (typeof objA !== "object" || objA === null || typeof objB !== "object" || objB === null) {
return false;
}
if (objA instanceof Map && objB instanceof Map) {
if (objA.size !== objB.size) return false;
for (const [key, value] of objA) {
if (!Object.is(value, objB.get(key))) {
return false;
}
}
return true;
}
if (objA instanceof Set && objB instanceof Set) {
if (objA.size !== objB.size) return false;
for (const value of objA) {
if (!objB.has(value)) {
return false;
}
}
return true;
}
const keysA = Object.keys(objA);
if (keysA.length !== Object.keys(objB).length) {
return false;
}
for (const keyA of keysA) {
if (!Object.prototype.hasOwnProperty.call(objB, keyA) || !Object.is(objA[keyA], objB[keyA])) {
return false;
}
}
return true;
}
var
frontend/node_modules/zustand/system/middleware.development.js (Line 142:2 - Line 151:11), frontend/node_modules/zustand/umd/middleware.development.js (Line 171:2 - Line 180:11)
|| stateFromDevtools === null) {
return;
}
if (JSON.stringify(api.getState()) !== JSON.stringify(stateFromDevtools)) {
setStateFromDevtools(stateFromDevtools);
}
return;
}
if (!api.dispatchFromDevtools) return;
if (typeof api.dispatch !== "function"
frontend/node_modules/zustand/system/middleware.development.js (Line 447:2 - Line 459:2), frontend/node_modules/zustand/system/middleware.development.js (Line 314:6 - Line 326:2)
,
partialize: (state) => state,
version: 0,
merge: (persistedState, currentState) => ({
...currentState,
...persistedState
}),
...baseOptions
};
let hasHydrated = false;
const hydrationListeners = /* @__PURE__ */ new Set();
const finishHydrationListeners = /* @__PURE__ */ new Set();
let storage =
frontend/node_modules/zustand/system/middleware.development.js (Line 477:2 - Line 492:4), frontend/node_modules/zustand/system/middleware.development.js (Line 355:9 - Line 370:4)
frontend/node_modules/zustand/esm/vanilla.mjs (Line 19:2 - Line 30:12), frontend/node_modules/zustand/system/vanilla.development.js (Line 24:11 - Line 35:12)
{
console.warn(
"[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."
);
}
listeners.clear();
};
const api = { setState, getState, getInitialState, subscribe, destroy };
const initialState = state = createState(setState, getState, api);
return api;
};
const createStore
frontend/node_modules/zustand/esm/vanilla.js (Line 1:1 - Line 19:8), frontend/node_modules/zustand/system/vanilla.development.js (Line 6:7 - Line 19:2)
frontend/node_modules/zustand/esm/vanilla.js (Line 19:2 - Line 32:8), frontend/node_modules/zustand/esm/vanilla.mjs (Line 19:2 - Line 32:2)
!== "production") {
console.warn(
"[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."
);
}
listeners.clear();
};
const api = { setState, getState, getInitialState, subscribe, destroy };
const initialState = state = createState(setState, getState, api);
return api;
};
const createStore = (createState) => createState ? createStoreImpl(createState) : createStoreImpl;
var vanilla = (createState) => {
if (process
frontend/node_modules/zustand/esm/traditional.mjs (Line 3:18 - Line 25:21), frontend/node_modules/zustand/system/traditional.development.js (Line 14:2 - Line 36:21)
frontend/node_modules/zustand/esm/index.mjs (Line 11:2 - Line 28:2), frontend/node_modules/zustand/system/index.development.js (Line 32:2 - Line 49:7)
equalityFn && !didWarnAboutEqualityFn) {
console.warn(
"[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"
);
didWarnAboutEqualityFn = true;
}
const slice = useSyncExternalStoreWithSelector(
api.subscribe,
api.getState,
api.getServerState || api.getInitialState,
selector,
equalityFn
);
useDebugValue(slice);
return slice;
}
const createImpl = (createState) => {
if ((
frontend/node_modules/zustand/esm/index.mjs (Line 28:2 - Line 38:7), frontend/node_modules/zustand/system/index.development.js (Line 49:2 - Line 59:7)
typeof createState !== "function") {
console.warn(
"[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`."
);
}
const api = typeof createState === "function" ? createStore(createState) : createState;
const useBoundStore = (selector, equalityFn) => useStore(api, selector, equalityFn);
Object.assign(useBoundStore, api);
return useBoundStore;
};
const create
frontend/node_modules/zustand/esm/index.js (Line 1:1 - Line 11:8), frontend/node_modules/zustand/esm/index.mjs (Line 1:1 - Line 11:2)
import { createStore } from 'zustand/vanilla';
export * from 'zustand/vanilla';
import ReactExports from 'react';
import useSyncExternalStoreExports from 'use-sync-external-store/shim/with-selector.js';
const { useDebugValue } = ReactExports;
const { useSyncExternalStoreWithSelector } = useSyncExternalStoreExports;
let didWarnAboutEqualityFn = false;
const identity = (arg) => arg;
function useStore(api, selector = identity, equalityFn) {
if (process
frontend/node_modules/zustand/esm/index.js (Line 11:2 - Line 28:8), frontend/node_modules/zustand/esm/index.mjs (Line 11:2 - Line 49:7)
!== "production" && equalityFn && !didWarnAboutEqualityFn) {
console.warn(
"[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"
);
didWarnAboutEqualityFn = true;
}
const slice = useSyncExternalStoreWithSelector(
api.subscribe,
api.getState,
api.getServerState || api.getInitialState,
selector,
equalityFn
);
useDebugValue(slice);
return slice;
}
const createImpl = (createState) => {
if (process
frontend/node_modules/zustand/esm/index.js (Line 28:2 - Line 40:8), frontend/node_modules/zustand/esm/index.mjs (Line 28:2 - Line 40:2)
!== "production" && typeof createState !== "function") {
console.warn(
"[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`."
);
}
const api = typeof createState === "function" ? createStore(createState) : createState;
const useBoundStore = (selector, equalityFn) => useStore(api, selector, equalityFn);
Object.assign(useBoundStore, api);
return useBoundStore;
};
const create = (createState) => createState ? createImpl(createState) : createImpl;
var react = (createState) => {
if (process
frontend/node_modules/zustand/esm/context.mjs (Line 12:2 - Line 61:7), frontend/node_modules/zustand/system/context.development.js (Line 22:9 - Line 71:2)
{
console.warn(
"[DEPRECATED] `context` will be removed in a future version. Instead use `import { createStore, useStore } from 'zustand'`. See: https://github.com/pmndrs/zustand/discussions/1180."
);
}
const ZustandContext = reactCreateContext(void 0);
const Provider = ({
createStore,
children
}) => {
const storeRef = useRef();
if (!storeRef.current) {
storeRef.current = createStore();
}
return createElement(
ZustandContext.Provider,
{ value: storeRef.current },
children
);
};
const useContextStore = (selector, equalityFn) => {
const store = useContext(ZustandContext);
if (!store) {
throw new Error(
"Seems like you have not used zustand provider as an ancestor."
);
}
return useStoreWithEqualityFn(
store,
selector,
equalityFn
);
};
const useStoreApi = () => {
const store = useContext(ZustandContext);
if (!store) {
throw new Error(
"Seems like you have not used zustand provider as an ancestor."
);
}
return useMemo(() => ({ ...store }), [store]);
};
return {
Provider,
useStore: useContextStore,
useStoreApi
};
}
export
frontend/node_modules/zustand/esm/context.js (Line 12:2 - Line 61:2), frontend/node_modules/zustand/esm/context.mjs (Line 12:2 - Line 61:2)
!== "production") {
console.warn(
"[DEPRECATED] `context` will be removed in a future version. Instead use `import { createStore, useStore } from 'zustand'`. See: https://github.com/pmndrs/zustand/discussions/1180."
);
}
const ZustandContext = reactCreateContext(void 0);
const Provider = ({
createStore,
children
}) => {
const storeRef = useRef();
if (!storeRef.current) {
storeRef.current = createStore();
}
return createElement(
ZustandContext.Provider,
{ value: storeRef.current },
children
);
};
const useContextStore = (selector, equalityFn) => {
const store = useContext(ZustandContext);
if (!store) {
throw new Error(
"Seems like you have not used zustand provider as an ancestor."
);
}
return useStoreWithEqualityFn(
store,
selector,
equalityFn
);
};
const useStoreApi = () => {
const store = useContext(ZustandContext);
if (!store) {
throw new Error(
"Seems like you have not used zustand provider as an ancestor."
);
}
return useMemo(() => ({ ...store }), [store]);
};
return {
Provider,
useStore: useContextStore,
useStoreApi
};
}
export { createContext as default };
frontend/node_modules/zod/v4-mini/index.cjs (Line 1:1 - Line 13:13), frontend/node_modules/zod/v4/mini/schemas.cjs (Line 1:1 - Line 13:19)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar
frontend/node_modules/zod/v4-mini/index.cjs (Line 12:2 - Line 17:13), frontend/node_modules/zod/v4/core/index.cjs (Line 17:2 - Line 29:8)
);
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar
frontend/node_modules/zod/v4/index.cjs (Line 1:1 - Line 20:11), frontend/node_modules/zod/v4/mini/schemas.cjs (Line 1:1 - Line 6:12)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const index_js_1
frontend/node_modules/zod/v3/index.cjs (Line 1:1 - Line 33:2), frontend/node_modules/zod/v4/mini/schemas.cjs (Line 1:1 - Line 33:2)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.z = void 0;
const z = __importStar(require("./external.cjs"));
exports.z = z;
__exportStar(require("./external.cjs"), exports);
exports.default = z;
frontend/node_modules/zod/v3/external.cjs (Line 1:1 - Line 17:15), frontend/node_modules/zod/v4/mini/schemas.cjs (Line 1:1 - Line 17:23)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./errors.cjs"
frontend/node_modules/zod/v3/errors.cjs (Line 1:1 - Line 6:16), backend/dist/database/seeds/004_comprehensive_demo_data.js (Line 1:1 - Line 6:5)
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.defaultErrorMap
frontend/node_modules/zod/v3/ZodError.js (Line 48:2 - Line 56:2), frontend/node_modules/zod/v4/core/errors.js (Line 41:2 - Line 49:3)
_mapper) {
const mapper = _mapper ||
function (issue) {
return issue.message;
};
const fieldErrors = { _errors: [] };
const processError = (error) => {
for (const issue of error.issues) {
if (issue.code === "invalid_union")
frontend/node_modules/zod/v3/ZodError.js (Line 63:15 - Line 76:33), frontend/node_modules/zod/v4/core/errors.js (Line 56:2 - Line 69:2)
);
}
else if (issue.path.length === 0) {
fieldErrors._errors.push(mapper(issue));
}
else {
let curr = fieldErrors;
let i = 0;
while (i < issue.path.length) {
const el = issue.path[i];
const terminal = i === issue.path.length - 1;
if (!terminal) {
curr[el] = curr[el] || { _errors: [] };
// if (typeof el === "string") {
frontend/node_modules/zod/v3/ZodError.js (Line 83:25 - Line 94:5), frontend/node_modules/zod/v4/core/errors.js (Line 69:21 - Line 80:6)
frontend/node_modules/yaml/dist/visit.js (Line 40:2 - Line 59:9), frontend/node_modules/yaml/browser/dist/visit.js (Line 38:2 - Line 57:7)
isDocument(node)) {
const cd = visit_(null, node.contents, visitor_, Object.freeze([node]));
if (cd === REMOVE)
node.contents = null;
}
else
visit_(null, node, visitor_, Object.freeze([]));
}
// Without the `as symbol` casts, TS declares these in the `visit`
// namespace using `var`, but then complains about that because
// `unique symbol` must be `const`.
/** Terminate visit traversal completely */
visit.BREAK = BREAK;
/** Do not visit the children of the current node */
visit.SKIP = SKIP;
/** Remove the current node */
visit.REMOVE = REMOVE;
function visit_(key, node, visitor, path) {
const ctrl = callVisitor(key, node, visitor, path);
if (identity
frontend/node_modules/yaml/dist/visit.js (Line 64:2 - Line 78:9), frontend/node_modules/yaml/browser/dist/visit.js (Line 62:2 - Line 76:7)
isCollection(node)) {
path = Object.freeze(path.concat(node));
for (let i = 0; i < node.items.length; ++i) {
const ci = visit_(i, node.items[i], visitor, path);
if (typeof ci === 'number')
i = ci - 1;
else if (ci === BREAK)
return BREAK;
else if (ci === REMOVE) {
node.items.splice(i, 1);
i -= 1;
}
}
}
else if (identity
frontend/node_modules/yaml/dist/visit.js (Line 78:2 - Line 127:9), frontend/node_modules/yaml/browser/dist/visit.js (Line 76:2 - Line 125:11)
isPair(node)) {
path = Object.freeze(path.concat(node));
const ck = visit_('key', node.key, visitor, path);
if (ck === BREAK)
return BREAK;
else if (ck === REMOVE)
node.key = null;
const cv = visit_('value', node.value, visitor, path);
if (cv === BREAK)
return BREAK;
else if (cv === REMOVE)
node.value = null;
}
}
return ctrl;
}
/**
* Apply an async visitor to an AST node or document.
*
* Walks through the tree (depth-first) starting from `node`, calling a
* `visitor` function with three arguments:
* - `key`: For sequence values and map `Pair`, the node's index in the
* collection. Within a `Pair`, `'key'` or `'value'`, correspondingly.
* `null` for the root node.
* - `node`: The current node.
* - `path`: The ancestry of the current node.
*
* The return value of the visitor may be used to control the traversal:
* - `Promise`: Must resolve to one of the following values
* - `undefined` (default): Do nothing and continue
* - `visit.SKIP`: Do not visit the children of this node, continue with next
* sibling
* - `visit.BREAK`: Terminate traversal completely
* - `visit.REMOVE`: Remove the current node, then continue with the next one
* - `Node`: Replace the current node, then continue by visiting it
* - `number`: While iterating the items of a sequence or map, set the index
* of the next step. This is useful especially if the index of the current
* node has changed.
*
* If `visitor` is a single function, it will be called with all values
* encountered in the tree, including e.g. `null` values. Alternatively,
* separate visitor functions may be defined for each `Map`, `Pair`, `Seq`,
* `Alias` and `Scalar` node. To define the same visitor function for more than
* one node type, use the `Collection` (map and seq), `Value` (map, seq & scalar)
* and `Node` (alias, map, seq & scalar) targets. Of all these, only the most
* specific defined one will be used for each node.
*/
async function visitAsync(node, visitor) {
const visitor_ = initVisitor(visitor);
if (identity
frontend/node_modules/yaml/dist/visit.js (Line 127:2 - Line 146:9), frontend/node_modules/yaml/browser/dist/visit.js (Line 125:2 - Line 144:7)
isDocument(node)) {
const cd = await visitAsync_(null, node.contents, visitor_, Object.freeze([node]));
if (cd === REMOVE)
node.contents = null;
}
else
await visitAsync_(null, node, visitor_, Object.freeze([]));
}
// Without the `as symbol` casts, TS declares these in the `visit`
// namespace using `var`, but then complains about that because
// `unique symbol` must be `const`.
/** Terminate visit traversal completely */
visitAsync.BREAK = BREAK;
/** Do not visit the children of the current node */
visitAsync.SKIP = SKIP;
/** Remove the current node */
visitAsync.REMOVE = REMOVE;
async function visitAsync_(key, node, visitor, path) {
const ctrl = await callVisitor(key, node, visitor, path);
if (identity
frontend/node_modules/yaml/dist/visit.js (Line 148:12 - Line 154:6), frontend/node_modules/yaml/dist/visit.js (Line 61:7 - Line 67:7)
(key, ctrl, visitor, path);
}
if (typeof ctrl !== 'symbol') {
if (identity.isCollection(node)) {
path = Object.freeze(path.concat(node));
for (let i = 0; i < node.items.length; ++i) {
const ci = await
frontend/node_modules/yaml/dist/visit.js (Line 151:2 - Line 167:6), frontend/node_modules/yaml/browser/dist/visit.js (Line 149:2 - Line 80:7)
isCollection(node)) {
path = Object.freeze(path.concat(node));
for (let i = 0; i < node.items.length; ++i) {
const ci = await visitAsync_(i, node.items[i], visitor, path);
if (typeof ci === 'number')
i = ci - 1;
else if (ci === BREAK)
return BREAK;
else if (ci === REMOVE) {
node.items.splice(i, 1);
i -= 1;
}
}
}
else if (identity.isPair(node)) {
path = Object.freeze(path.concat(node));
const ck = await
frontend/node_modules/yaml/dist/visit.js (Line 165:2 - Line 203:9), frontend/node_modules/yaml/browser/dist/visit.js (Line 163:2 - Line 201:6)
frontend/node_modules/ts-interface-checker/dist/types.js (Line 6:1 - Line 20:11), frontend/node_modules/ts-interface-checker/dist/util.js (Line 2:1 - Line 16:14)
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.basicTypes
frontend/node_modules/ts-interface-checker/dist/types.js (Line 477:8 - Line 484:2), frontend/node_modules/ts-interface-checker/dist/types.js (Line 137:7 - Line 143:3)
);
});
var checker = function (value, ctx) {
if (!Array.isArray(value)) {
return ctx.fail(null, "is not an array", 0);
}
for (var i = 0; i < itemCheckers.length; i++) {
var p
frontend/node_modules/ts-interface-checker/dist/types.js (Line 495:17 - Line 510:11), frontend/node_modules/ts-interface-checker/dist/types.js (Line 146:17 - Line 161:7)
frontend/node_modules/sucrase/dist/register.js (Line 75:2 - Line 88:2), frontend/node_modules/sucrase/dist/esm/register.js (Line 75:2 - Line 88:2)
function registerAll(hookOptions) {
const reverts = [
registerJS(hookOptions),
registerJSX(hookOptions),
registerTS(hookOptions),
registerTSX(hookOptions),
];
return () => {
for (const fn of reverts) {
fn();
}
};
}
frontend/node_modules/sucrase/dist/index.js (Line 39:2 - Line 53:19), frontend/node_modules/sucrase/dist/esm/index.js (Line 39:16 - Line 53:17)
(
sucraseContext,
options.transforms,
Boolean(options.enableLegacyBabel5ModuleInterop),
options,
);
const transformerResult = transformer.transform();
let result = {code: transformerResult.code};
if (options.sourceMapOptions) {
if (!options.filePath) {
throw new Error("filePath must be specified when generating a source map.");
}
result = {
...result,
sourceMap: _computeSourceMap2
frontend/node_modules/sucrase/dist/index.js (Line 54:11 - Line 70:8), frontend/node_modules/sucrase/dist/esm/index.js (Line 54:11 - Line 75:4)
frontend/node_modules/sucrase/dist/index.js (Line 81:1 - Line 95:8), frontend/node_modules/sucrase/dist/esm/index.js (Line 81:1 - Line 95:6)
/**
* Call into the parser/tokenizer and do some further preprocessing:
* - Come up with a set of used names so that we can assign new names.
* - Preprocess all import/export statements so we know which globals we are interested in.
* - Compute situations where any of those globals are shadowed.
*
* In the future, some of these preprocessing steps can be skipped based on what actual work is
* being done.
*/
function getSucraseContext(code, options) {
const isJSXEnabled = options.transforms.includes("jsx");
const isTypeScriptEnabled = options.transforms.includes("typescript");
const isFlowEnabled = options.transforms.includes("flow");
const disableESTransforms = options.disableESTransforms === true;
const file = _parser
frontend/node_modules/sucrase/dist/index.js (Line 124:2 - Line 130:26), frontend/node_modules/sucrase/dist/esm/index.js (Line 124:2 - Line 130:24)
tokenProcessor, scopes, importProcessor.getGlobalNames());
if (options.transforms.includes("typescript") && !options.keepUnusedImports) {
importProcessor.pruneTypeOnlyImports();
}
} else if (options.transforms.includes("typescript") && !options.keepUnusedImports) {
// Shadowed global detection is needed for TS implicit elision of imported names.
_identifyShadowedGlobals2
frontend/node_modules/sucrase/dist/identifyShadowedGlobals.js (Line 44:1 - Line 68:7), frontend/node_modules/sucrase/dist/esm/identifyShadowedGlobals.js (Line 44:1 - Line 68:3)
function markShadowedGlobals(
tokens,
scopes,
globalNames,
) {
const scopeStack = [];
let scopeIndex = scopes.length - 1;
// Scopes were generated at completion time, so they're sorted by end index, so we can maintain a
// good stack by going backwards through them.
for (let i = tokens.tokens.length - 1; ; i--) {
while (scopeStack.length > 0 && scopeStack[scopeStack.length - 1].startTokenIndex === i + 1) {
scopeStack.pop();
}
while (scopeIndex >= 0 && scopes[scopeIndex].endTokenIndex === i + 1) {
scopeStack.push(scopes[scopeIndex]);
scopeIndex--;
}
// Process scopes after the last iteration so we can make sure we pop all of them.
if (i < 0) {
break;
}
const token = tokens.tokens[i];
const name = tokens.identifierNameForToken(token);
if (scopeStack.length > 1 && !token.isType && token.type === _types
frontend/node_modules/sucrase/dist/identifyShadowedGlobals.js (Line 71:2 - Line 92:7), frontend/node_modules/sucrase/dist/esm/identifyShadowedGlobals.js (Line 71:2 - Line 92:3)
token)) {
let stackIndex = scopeStack.length - 1;
while (stackIndex > 0 && !scopeStack[stackIndex].isFunctionScope) {
stackIndex--;
}
if (stackIndex < 0) {
throw new Error("Did not find parent function scope.");
}
markShadowedForScope(scopeStack[stackIndex], tokens, name);
}
}
}
if (scopeStack.length > 0) {
throw new Error("Expected empty scope stack after processing file.");
}
}
function markShadowedForScope(scope, tokens, name) {
for (let i = scope.startTokenIndex; i < scope.endTokenIndex; i++) {
const token = tokens.tokens[i];
if (
(token.type === _types
frontend/node_modules/sucrase/dist/computeSourceMap.js (Line 30:2 - Line 42:12), frontend/node_modules/sucrase/dist/esm/computeSourceMap.js (Line 30:11 - Line 42:16)
({file: options.compiledFilename});
let tokenIndex = 0;
// currentMapping is the output source index for the current input token being
// considered.
let currentMapping = rawMappings[0];
while (currentMapping === undefined && tokenIndex < rawMappings.length - 1) {
tokenIndex++;
currentMapping = rawMappings[tokenIndex];
}
let line = 0;
let lineStart = 0;
if (currentMapping !== lineStart) {
_genmapping
frontend/node_modules/sucrase/dist/computeSourceMap.js (Line 42:2 - Line 48:12), frontend/node_modules/sucrase/dist/esm/computeSourceMap.js (Line 42:2 - Line 48:16)
map, line, 0, filePath, line, 0);
}
for (let i = 0; i < generatedCode.length; i++) {
if (i === currentMapping) {
const genColumn = currentMapping - lineStart;
const sourceColumn = sourceColumns[tokenIndex];
_genmapping
frontend/node_modules/sucrase/dist/computeSourceMap.js (Line 48:2 - Line 57:11), frontend/node_modules/sucrase/dist/esm/computeSourceMap.js (Line 48:2 - Line 57:10)
frontend/node_modules/sucrase/dist/computeSourceMap.js (Line 69:1 - Line 84:11), frontend/node_modules/sucrase/dist/esm/computeSourceMap.js (Line 69:1 - Line 84:10)
/**
* Create an array mapping each token index to the 0-based column of the start
* position of the token.
*/
function computeSourceColumns(code, tokens) {
const sourceColumns = new Array(tokens.length);
let tokenIndex = 0;
let currentMapping = tokens[tokenIndex].start;
let lineStart = 0;
for (let i = 0; i < code.length; i++) {
if (i === currentMapping) {
sourceColumns[tokenIndex] = currentMapping - lineStart;
tokenIndex++;
currentMapping = tokens[tokenIndex].start;
}
if (code.charCodeAt(i) === _charcodes
frontend/node_modules/sucrase/dist/cli.js (Line 21:5 - Line 63:12), frontend/node_modules/sucrase/dist/esm/cli.js (Line 21:5 - Line 63:10)
.description(`Sucrase: super-fast Babel alternative.`)
.usage("[options] <srcDir>")
.option(
"-d, --out-dir <out>",
"Compile an input directory of modules into an output directory.",
)
.option(
"-p, --project <dir>",
"Compile a TypeScript project, will read from tsconfig.json in <dir>",
)
.option("--out-extension <extension>", "File extension to use for all output files.", "js")
.option("--exclude-dirs <paths>", "Names of directories that should not be traversed.")
.option("-q, --quiet", "Don't print the names of converted files.")
.option("-t, --transforms <transforms>", "Comma-separated list of transforms to run.")
.option("--disable-es-transforms", "Opt out of all ES syntax transforms.")
.option("--jsx-runtime <string>", "Transformation mode for the JSX transform.")
.option("--production", "Disable debugging information from JSX in output.")
.option(
"--jsx-import-source <string>",
"Automatic JSX transform import path prefix, defaults to `React.Fragment`.",
)
.option(
"--jsx-pragma <string>",
"Classic JSX transform element creation function, defaults to `React.createElement`.",
)
.option(
"--jsx-fragment-pragma <string>",
"Classic JSX transform fragment component, defaults to `React.Fragment`.",
)
.option("--keep-unused-imports", "Disable automatic removal of type-only imports/exports.")
.option("--preserve-dynamic-import", "Don't transpile dynamic import() to require.")
.option(
"--inject-create-require-for-import-require",
"Use `createRequire` when transpiling TS `import = require` to ESM.",
)
.option(
"--enable-legacy-typescript-module-interop",
"Use default TypeScript ESM/CJS interop strategy.",
)
.option("--enable-legacy-babel5-module-interop", "Use Babel 5 ESM/CJS interop strategy.")
.parse(process.argv);
if (_commander2
frontend/node_modules/sucrase/dist/cli.js (Line 127:1 - Line 135:4), frontend/node_modules/sucrase/dist/esm/cli.js (Line 127:1 - Line 135:7)
frontend/node_modules/sucrase/dist/cli.js (Line 281:2 - Line 314:4), frontend/node_modules/sucrase/dist/esm/cli.js (Line 281:2 - Line 314:9)
process.cwd(), options.project, compilerOpts.outDir);
}
if (compilerOpts.esModuleInterop !== true) {
sucraseOpts.enableLegacyTypeScriptModuleInterop = true;
}
if (compilerOpts.module === "commonjs") {
if (!sucraseOpts.transforms.includes("imports")) {
sucraseOpts.transforms.push("imports");
}
}
}
async function buildDirectory(options) {
let files;
if (options.outDirPath && options.srcDirPath) {
files = await findFiles(options);
} else if (options.project) {
await updateOptionsFromProject(options);
files = await runGlob(options);
} else {
console.error("Project or Source directory required.");
process.exit(1);
}
for (const file of files) {
await buildFile(file.srcPath, file.outPath, options);
}
}
async function buildFile(srcPath, outPath, options) {
if (!options.quiet) {
console.log(`${srcPath} -> ${outPath}`);
}
const code = (await _fs
frontend/node_modules/sucrase/dist/TokenProcessor.js (Line 17:2 - Line 72:7), frontend/node_modules/sucrase/dist/esm/TokenProcessor.js (Line 17:2 - Line 72:3)
class TokenProcessor {
__init() {this.resultCode = ""}
// Array mapping input token index to optional string index position in the
// output code.
__init2() {this.resultMappings = new Array(this.tokens.length)}
__init3() {this.tokenIndex = 0}
constructor(
code,
tokens,
isFlowEnabled,
disableESTransforms,
helperManager,
) {;this.code = code;this.tokens = tokens;this.isFlowEnabled = isFlowEnabled;this.disableESTransforms = disableESTransforms;this.helperManager = helperManager;TokenProcessor.prototype.__init.call(this);TokenProcessor.prototype.__init2.call(this);TokenProcessor.prototype.__init3.call(this);}
/**
* Snapshot the token state in a way that can be restored later, useful for
* things like lookahead.
*
* resultMappings do not need to be copied since in all use cases, they will
* be overwritten anyway after restore.
*/
snapshot() {
return {
resultCode: this.resultCode,
tokenIndex: this.tokenIndex,
};
}
restoreToSnapshot(snapshot) {
this.resultCode = snapshot.resultCode;
this.tokenIndex = snapshot.tokenIndex;
}
/**
* Remove and return the code generated since the snapshot, leaving the
* current token position in-place. Unlike most TokenProcessor operations,
* this operation can result in input/output line number mismatches because
* the removed code may contain newlines, so this operation should be used
* sparingly.
*/
dangerouslyGetAndRemoveCodeSinceSnapshot(snapshot) {
const result = this.resultCode.slice(snapshot.resultCode.length);
this.resultCode = snapshot.resultCode;
return result;
}
reset() {
this.resultCode = "";
this.resultMappings = new Array(this.tokens.length);
this.tokenIndex = 0;
}
matchesContextualAtIndex(index, contextualKeyword) {
return (
this.matches1AtIndex(index, _types
frontend/node_modules/sucrase/dist/TokenProcessor.js (Line 72:10 - Line 216:7), frontend/node_modules/sucrase/dist/esm/TokenProcessor.js (Line 72:3 - Line 216:3)
.name) &&
this.tokens[index].contextualKeyword === contextualKeyword
);
}
identifierNameAtIndex(index) {
// TODO: We need to process escapes since technically you can have unicode escapes in variable
// names.
return this.identifierNameForToken(this.tokens[index]);
}
identifierNameAtRelativeIndex(relativeIndex) {
return this.identifierNameForToken(this.tokenAtRelativeIndex(relativeIndex));
}
identifierName() {
return this.identifierNameForToken(this.currentToken());
}
identifierNameForToken(token) {
return this.code.slice(token.start, token.end);
}
rawCodeForToken(token) {
return this.code.slice(token.start, token.end);
}
stringValueAtIndex(index) {
return this.stringValueForToken(this.tokens[index]);
}
stringValue() {
return this.stringValueForToken(this.currentToken());
}
stringValueForToken(token) {
// This is used to identify when two imports are the same and to resolve TypeScript enum keys.
// Ideally we'd process escapes within the strings, but for now we pretty much take the raw
// code.
return this.code.slice(token.start + 1, token.end - 1);
}
matches1AtIndex(index, t1) {
return this.tokens[index].type === t1;
}
matches2AtIndex(index, t1, t2) {
return this.tokens[index].type === t1 && this.tokens[index + 1].type === t2;
}
matches3AtIndex(index, t1, t2, t3) {
return (
this.tokens[index].type === t1 &&
this.tokens[index + 1].type === t2 &&
this.tokens[index + 2].type === t3
);
}
matches1(t1) {
return this.tokens[this.tokenIndex].type === t1;
}
matches2(t1, t2) {
return this.tokens[this.tokenIndex].type === t1 && this.tokens[this.tokenIndex + 1].type === t2;
}
matches3(t1, t2, t3) {
return (
this.tokens[this.tokenIndex].type === t1 &&
this.tokens[this.tokenIndex + 1].type === t2 &&
this.tokens[this.tokenIndex + 2].type === t3
);
}
matches4(t1, t2, t3, t4) {
return (
this.tokens[this.tokenIndex].type === t1 &&
this.tokens[this.tokenIndex + 1].type === t2 &&
this.tokens[this.tokenIndex + 2].type === t3 &&
this.tokens[this.tokenIndex + 3].type === t4
);
}
matches5(t1, t2, t3, t4, t5) {
return (
this.tokens[this.tokenIndex].type === t1 &&
this.tokens[this.tokenIndex + 1].type === t2 &&
this.tokens[this.tokenIndex + 2].type === t3 &&
this.tokens[this.tokenIndex + 3].type === t4 &&
this.tokens[this.tokenIndex + 4].type === t5
);
}
matchesContextual(contextualKeyword) {
return this.matchesContextualAtIndex(this.tokenIndex, contextualKeyword);
}
matchesContextIdAndLabel(type, contextId) {
return this.matches1(type) && this.currentToken().contextId === contextId;
}
previousWhitespaceAndComments() {
let whitespaceAndComments = this.code.slice(
this.tokenIndex > 0 ? this.tokens[this.tokenIndex - 1].end : 0,
this.tokenIndex < this.tokens.length ? this.tokens[this.tokenIndex].start : this.code.length,
);
if (this.isFlowEnabled) {
whitespaceAndComments = whitespaceAndComments.replace(/@flow/g, "");
}
return whitespaceAndComments;
}
replaceToken(newCode) {
this.resultCode += this.previousWhitespaceAndComments();
this.appendTokenPrefix();
this.resultMappings[this.tokenIndex] = this.resultCode.length;
this.resultCode += newCode;
this.appendTokenSuffix();
this.tokenIndex++;
}
replaceTokenTrimmingLeftWhitespace(newCode) {
this.resultCode += this.previousWhitespaceAndComments().replace(/[^\r\n]/g, "");
this.appendTokenPrefix();
this.resultMappings[this.tokenIndex] = this.resultCode.length;
this.resultCode += newCode;
this.appendTokenSuffix();
this.tokenIndex++;
}
removeInitialToken() {
this.replaceToken("");
}
removeToken() {
this.replaceTokenTrimmingLeftWhitespace("");
}
/**
* Remove all code until the next }, accounting for balanced braces.
*/
removeBalancedCode() {
let braceDepth = 0;
while (!this.isAtEnd()) {
if (this.matches1(_types
frontend/node_modules/sucrase/dist/TokenProcessor.js (Line 218:10 - Line 263:19), frontend/node_modules/sucrase/dist/esm/TokenProcessor.js (Line 218:3 - Line 263:17)
frontend/node_modules/sucrase/dist/NameManager.js (Line 8:2 - Line 27:2), frontend/node_modules/sucrase/dist/esm/NameManager.js (Line 8:2 - Line 27:2)
code, tokens));
}
claimFreeName(name) {
const newName = this.findFreeName(name);
this.usedNames.add(newName);
return newName;
}
findFreeName(name) {
if (!this.usedNames.has(name)) {
return name;
}
let suffixNum = 2;
while (this.usedNames.has(name + String(suffixNum))) {
suffixNum++;
}
return name + String(suffixNum);
}
}
frontend/node_modules/sucrase/dist/HelperManager.js (Line 3:1 - Line 130:6), frontend/node_modules/sucrase/dist/esm/HelperManager.js (Line 3:1 - Line 130:7)
const HELPERS = {
require: `
import {createRequire as CREATE_REQUIRE_NAME} from "module";
const require = CREATE_REQUIRE_NAME(import.meta.url);
`,
interopRequireWildcard: `
function interopRequireWildcard(obj) {
if (obj && obj.__esModule) {
return obj;
} else {
var newObj = {};
if (obj != null) {
for (var key in obj) {
if (Object.prototype.hasOwnProperty.call(obj, key)) {
newObj[key] = obj[key];
}
}
}
newObj.default = obj;
return newObj;
}
}
`,
interopRequireDefault: `
function interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
`,
createNamedExportFrom: `
function createNamedExportFrom(obj, localName, importedName) {
Object.defineProperty(exports, localName, {enumerable: true, configurable: true, get: () => obj[importedName]});
}
`,
// Note that TypeScript and Babel do this differently; TypeScript does a simple existence
// check in the exports object and does a plain assignment, whereas Babel uses
// defineProperty and builds an object of explicitly-exported names so that star exports can
// always take lower precedence. For now, we do the easier TypeScript thing.
createStarExport: `
function createStarExport(obj) {
Object.keys(obj)
.filter((key) => key !== "default" && key !== "__esModule")
.forEach((key) => {
if (exports.hasOwnProperty(key)) {
return;
}
Object.defineProperty(exports, key, {enumerable: true, configurable: true, get: () => obj[key]});
});
}
`,
nullishCoalesce: `
function nullishCoalesce(lhs, rhsFn) {
if (lhs != null) {
return lhs;
} else {
return rhsFn();
}
}
`,
asyncNullishCoalesce: `
async function asyncNullishCoalesce(lhs, rhsFn) {
if (lhs != null) {
return lhs;
} else {
return await rhsFn();
}
}
`,
optionalChain: `
function optionalChain(ops) {
let lastAccessLHS = undefined;
let value = ops[0];
let i = 1;
while (i < ops.length) {
const op = ops[i];
const fn = ops[i + 1];
i += 2;
if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) {
return undefined;
}
if (op === 'access' || op === 'optionalAccess') {
lastAccessLHS = value;
value = fn(value);
} else if (op === 'call' || op === 'optionalCall') {
value = fn((...args) => value.call(lastAccessLHS, ...args));
lastAccessLHS = undefined;
}
}
return value;
}
`,
asyncOptionalChain: `
async function asyncOptionalChain(ops) {
let lastAccessLHS = undefined;
let value = ops[0];
let i = 1;
while (i < ops.length) {
const op = ops[i];
const fn = ops[i + 1];
i += 2;
if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) {
return undefined;
}
if (op === 'access' || op === 'optionalAccess') {
lastAccessLHS = value;
value = await fn(value);
} else if (op === 'call' || op === 'optionalCall') {
value = await fn((...args) => value.call(lastAccessLHS, ...args));
lastAccessLHS = undefined;
}
}
return value;
}
`,
optionalChainDelete: `
function optionalChainDelete(ops) {
const result = OPTIONAL_CHAIN_NAME(ops);
return result == null ? true : result;
}
`,
asyncOptionalChainDelete: `
async function asyncOptionalChainDelete(ops) {
const result = await ASYNC_OPTIONAL_CHAIN_NAME(ops);
return result == null ? true : result;
}
`,
};
class
frontend/node_modules/sucrase/dist/HelperManager.js (Line 130:2 - Line 176:2), frontend/node_modules/sucrase/dist/esm/HelperManager.js (Line 130:2 - Line 176:2)
class HelperManager {
__init() {this.helperNames = {}}
__init2() {this.createRequireName = null}
constructor( nameManager) {;this.nameManager = nameManager;HelperManager.prototype.__init.call(this);HelperManager.prototype.__init2.call(this);}
getHelperName(baseName) {
let helperName = this.helperNames[baseName];
if (helperName) {
return helperName;
}
helperName = this.nameManager.claimFreeName(`_${baseName}`);
this.helperNames[baseName] = helperName;
return helperName;
}
emitHelpers() {
let resultCode = "";
if (this.helperNames.optionalChainDelete) {
this.getHelperName("optionalChain");
}
if (this.helperNames.asyncOptionalChainDelete) {
this.getHelperName("asyncOptionalChain");
}
for (const [baseName, helperCodeTemplate] of Object.entries(HELPERS)) {
const helperName = this.helperNames[baseName];
let helperCode = helperCodeTemplate;
if (baseName === "optionalChainDelete") {
helperCode = helperCode.replace("OPTIONAL_CHAIN_NAME", this.helperNames.optionalChain);
} else if (baseName === "asyncOptionalChainDelete") {
helperCode = helperCode.replace(
"ASYNC_OPTIONAL_CHAIN_NAME",
this.helperNames.asyncOptionalChain,
);
} else if (baseName === "require") {
if (this.createRequireName === null) {
this.createRequireName = this.nameManager.claimFreeName("_createRequire");
}
helperCode = helperCode.replace(/CREATE_REQUIRE_NAME/g, this.createRequireName);
}
if (helperName) {
resultCode += " ";
resultCode += helperCode.replace(baseName, helperName).replace(/\s+/g, " ").trim();
}
}
return resultCode;
}
}
frontend/node_modules/sucrase/dist/CJSImportProcessor.js (Line 33:2 - Line 53:7), frontend/node_modules/sucrase/dist/esm/CJSImportProcessor.js (Line 33:2 - Line 53:3)
class CJSImportProcessor {
__init() {this.nonTypeIdentifiers = new Set()}
__init2() {this.importInfoByPath = new Map()}
__init3() {this.importsToReplace = new Map()}
__init4() {this.identifierReplacements = new Map()}
__init5() {this.exportBindingsByLocalName = new Map()}
constructor(
nameManager,
tokens,
enableLegacyTypeScriptModuleInterop,
options,
isTypeScriptTransformEnabled,
keepUnusedImports,
helperManager,
) {;this.nameManager = nameManager;this.tokens = tokens;this.enableLegacyTypeScriptModuleInterop = enableLegacyTypeScriptModuleInterop;this.options = options;this.isTypeScriptTransformEnabled = isTypeScriptTransformEnabled;this.keepUnusedImports = keepUnusedImports;this.helperManager = helperManager;CJSImportProcessor.prototype.__init.call(this);CJSImportProcessor.prototype.__init2.call(this);CJSImportProcessor.prototype.__init3.call(this);CJSImportProcessor.prototype.__init4.call(this);CJSImportProcessor.prototype.__init5.call(this);}
preprocessTokens() {
for (let i = 0; i < this.tokens.tokens.length; i++) {
if (
this.tokens.matches1AtIndex(i, _types
frontend/node_modules/sucrase/dist/CJSImportProcessor.js (Line 73:2 - Line 191:10), frontend/node_modules/sucrase/dist/esm/CJSImportProcessor.js (Line 73:2 - Line 191:18)
this.tokens, this.options);
for (const [path, importInfo] of this.importInfoByPath.entries()) {
if (
importInfo.hasBareImport ||
importInfo.hasStarExport ||
importInfo.exportStarNames.length > 0 ||
importInfo.namedExports.length > 0
) {
continue;
}
const names = [
...importInfo.defaultNames,
...importInfo.wildcardNames,
...importInfo.namedImports.map(({localName}) => localName),
];
if (names.every((name) => this.shouldAutomaticallyElideImportedName(name))) {
this.importsToReplace.set(path, "");
}
}
}
shouldAutomaticallyElideImportedName(name) {
return (
this.isTypeScriptTransformEnabled &&
!this.keepUnusedImports &&
!this.nonTypeIdentifiers.has(name)
);
}
generateImportReplacements() {
for (const [path, importInfo] of this.importInfoByPath.entries()) {
const {
defaultNames,
wildcardNames,
namedImports,
namedExports,
exportStarNames,
hasStarExport,
} = importInfo;
if (
defaultNames.length === 0 &&
wildcardNames.length === 0 &&
namedImports.length === 0 &&
namedExports.length === 0 &&
exportStarNames.length === 0 &&
!hasStarExport
) {
// Import is never used, so don't even assign a name.
this.importsToReplace.set(path, `require('${path}');`);
continue;
}
const primaryImportName = this.getFreeIdentifierForPath(path);
let secondaryImportName;
if (this.enableLegacyTypeScriptModuleInterop) {
secondaryImportName = primaryImportName;
} else {
secondaryImportName =
wildcardNames.length > 0 ? wildcardNames[0] : this.getFreeIdentifierForPath(path);
}
let requireCode = `var ${primaryImportName} = require('${path}');`;
if (wildcardNames.length > 0) {
for (const wildcardName of wildcardNames) {
const moduleExpr = this.enableLegacyTypeScriptModuleInterop
? primaryImportName
: `${this.helperManager.getHelperName("interopRequireWildcard")}(${primaryImportName})`;
requireCode += ` var ${wildcardName} = ${moduleExpr};`;
}
} else if (exportStarNames.length > 0 && secondaryImportName !== primaryImportName) {
requireCode += ` var ${secondaryImportName} = ${this.helperManager.getHelperName(
"interopRequireWildcard",
)}(${primaryImportName});`;
} else if (defaultNames.length > 0 && secondaryImportName !== primaryImportName) {
requireCode += ` var ${secondaryImportName} = ${this.helperManager.getHelperName(
"interopRequireDefault",
)}(${primaryImportName});`;
}
for (const {importedName, localName} of namedExports) {
requireCode += ` ${this.helperManager.getHelperName(
"createNamedExportFrom",
)}(${primaryImportName}, '${localName}', '${importedName}');`;
}
for (const exportStarName of exportStarNames) {
requireCode += ` exports.${exportStarName} = ${secondaryImportName};`;
}
if (hasStarExport) {
requireCode += ` ${this.helperManager.getHelperName(
"createStarExport",
)}(${primaryImportName});`;
}
this.importsToReplace.set(path, requireCode);
for (const defaultName of defaultNames) {
this.identifierReplacements.set(defaultName, `${secondaryImportName}.default`);
}
for (const {importedName, localName} of namedImports) {
this.identifierReplacements.set(localName, `${primaryImportName}.${importedName}`);
}
}
}
getFreeIdentifierForPath(path) {
const components = path.split("/");
const lastComponent = components[components.length - 1];
const baseName = lastComponent.replace(/\W/g, "");
return this.nameManager.claimFreeName(`_${baseName}`);
}
preprocessImportAtIndex(index) {
const defaultNames = [];
const wildcardNames = [];
const namedImports = [];
index++;
if (
(this.tokens.matchesContextualAtIndex(index, _keywords
frontend/node_modules/sucrase/dist/CJSImportProcessor.js (Line 220:10 - Line 234:10), frontend/node_modules/sucrase/dist/esm/CJSImportProcessor.js (Line 220:3 - Line 234:18)
.braceL)) {
const result = this.getNamedImports(index + 1);
index = result.newIndex;
for (const namedImport of result.namedImports) {
// Treat {default as X} as a default import to ensure usage of require interop helper
if (namedImport.importedName === "default") {
defaultNames.push(namedImport.localName);
} else {
namedImports.push(namedImport);
}
}
}
if (this.tokens.matchesContextualAtIndex(index, _keywords
frontend/node_modules/sucrase/dist/CJSImportProcessor.js (Line 238:10 - Line 253:7), frontend/node_modules/sucrase/dist/esm/CJSImportProcessor.js (Line 238:3 - Line 253:3)
.string)) {
throw new Error("Expected string token at the end of import statement.");
}
const path = this.tokens.stringValueAtIndex(index);
const importInfo = this.getImportInfo(path);
importInfo.defaultNames.push(...defaultNames);
importInfo.wildcardNames.push(...wildcardNames);
importInfo.namedImports.push(...namedImports);
if (defaultNames.length === 0 && wildcardNames.length === 0 && namedImports.length === 0) {
importInfo.hasBareImport = true;
}
}
preprocessExportAtIndex(index) {
if (
this.tokens.matches2AtIndex(index, _types
frontend/node_modules/sucrase/dist/CJSImportProcessor.js (Line 291:10 - Line 299:11), frontend/node_modules/sucrase/dist/esm/CJSImportProcessor.js (Line 291:3 - Line 299:14)
.eq)) {
const endIndex = this.tokens.currentToken().rhsEndIndex;
if (endIndex == null) {
throw new Error("Expected = token with an end index.");
}
i = endIndex - 1;
} else {
const token = this.tokens.tokens[i];
if (_tokenizer
frontend/node_modules/sucrase/dist/CJSImportProcessor.js (Line 299:2 - Line 318:10), frontend/node_modules/sucrase/dist/esm/CJSImportProcessor.js (Line 299:2 - Line 318:18)
token)) {
const exportName = this.tokens.identifierNameAtIndex(i);
this.identifierReplacements.set(exportName, `exports.${exportName}`);
}
}
}
}
/**
* Walk this export statement just in case it's an export...from statement.
* If it is, combine it into the import info for that path. Otherwise, just
* bail out; it'll be handled later.
*/
preprocessNamedExportAtIndex(index) {
// export {
index += 2;
const {newIndex, namedImports} = this.getNamedImports(index);
index = newIndex;
if (this.tokens.matchesContextualAtIndex(index, _keywords
frontend/node_modules/sucrase/dist/CJSImportProcessor.js (Line 318:2 - Line 328:7), frontend/node_modules/sucrase/dist/esm/CJSImportProcessor.js (Line 318:2 - Line 328:3)
ContextualKeyword._from)) {
index++;
} else {
// Reinterpret "a as b" to be local/exported rather than imported/local.
for (const {importedName: localName, localName: exportedName} of namedImports) {
this.addExportBinding(localName, exportedName);
}
return;
}
if (!this.tokens.matches1AtIndex(index, _types
frontend/node_modules/sucrase/dist/CJSImportProcessor.js (Line 325:7 - Line 333:13), frontend/node_modules/sucrase/dist/CJSImportProcessor.js (Line 235:3 - Line 243:13)
;
}
if (!this.tokens.matches1AtIndex(index, _types.TokenType.string)) {
throw new Error("Expected string token at the end of import statement.");
}
const path = this.tokens.stringValueAtIndex(index);
const importInfo = this.getImportInfo(path);
importInfo.namedExports
frontend/node_modules/sucrase/dist/CJSImportProcessor.js (Line 328:10 - Line 338:7), frontend/node_modules/sucrase/dist/esm/CJSImportProcessor.js (Line 328:3 - Line 338:3)
.string)) {
throw new Error("Expected string token at the end of import statement.");
}
const path = this.tokens.stringValueAtIndex(index);
const importInfo = this.getImportInfo(path);
importInfo.namedExports.push(...namedImports);
}
preprocessExportStarAtIndex(index) {
let exportedName = null;
if (this.tokens.matches3AtIndex(index, _types
frontend/node_modules/sucrase/dist/CJSImportProcessor.js (Line 348:10 - Line 363:7), frontend/node_modules/sucrase/dist/esm/CJSImportProcessor.js (Line 348:3 - Line 363:3)
.string)) {
throw new Error("Expected string token at the end of star export statement.");
}
const path = this.tokens.stringValueAtIndex(index);
const importInfo = this.getImportInfo(path);
if (exportedName !== null) {
importInfo.exportStarNames.push(exportedName);
} else {
importInfo.hasStarExport = true;
}
}
getNamedImports(index) {
const namedImports = [];
while (true) {
if (this.tokens.matches1AtIndex(index, _types
frontend/node_modules/sucrase/dist/CJSImportProcessor.js (Line 368:2 - Line 377:7), frontend/node_modules/sucrase/dist/esm/CJSImportProcessor.js (Line 368:2 - Line 377:3)
this.tokens, index);
index = specifierInfo.endIndex;
if (!specifierInfo.isType) {
namedImports.push({
importedName: specifierInfo.leftName,
localName: specifierInfo.rightName,
});
}
if (this.tokens.matches2AtIndex(index, _types
frontend/node_modules/sucrase/dist/CJSImportProcessor.js (Line 383:10 - Line 456:2), frontend/node_modules/sucrase/dist/esm/CJSImportProcessor.js (Line 383:3 - Line 456:2)
.comma)) {
index++;
} else {
throw new Error(`Unexpected token: ${JSON.stringify(this.tokens.tokens[index])}`);
}
}
return {newIndex: index, namedImports};
}
/**
* Get a mutable import info object for this path, creating one if it doesn't
* exist yet.
*/
getImportInfo(path) {
const existingInfo = this.importInfoByPath.get(path);
if (existingInfo) {
return existingInfo;
}
const newInfo = {
defaultNames: [],
wildcardNames: [],
namedImports: [],
namedExports: [],
hasBareImport: false,
exportStarNames: [],
hasStarExport: false,
};
this.importInfoByPath.set(path, newInfo);
return newInfo;
}
addExportBinding(localName, exportedName) {
if (!this.exportBindingsByLocalName.has(localName)) {
this.exportBindingsByLocalName.set(localName, []);
}
this.exportBindingsByLocalName.get(localName).push(exportedName);
}
/**
* Return the code to use for the import for this path, or the empty string if
* the code has already been "claimed" by a previous import.
*/
claimImportCode(importPath) {
const result = this.importsToReplace.get(importPath);
this.importsToReplace.set(importPath, "");
return result || "";
}
getIdentifierReplacement(identifierName) {
return this.identifierReplacements.get(identifierName) || null;
}
/**
* Return a string like `exports.foo = exports.bar`.
*/
resolveExportBinding(assignedName) {
const exportedNames = this.exportBindingsByLocalName.get(assignedName);
if (!exportedNames || exportedNames.length === 0) {
return null;
}
return exportedNames.map((exportedName) => `exports.${exportedName}`).join(" = ");
}
/**
* Return all imported/exported names where we might be interested in whether usages of those
* names are shadowed.
*/
getGlobalNames() {
return new Set([
...this.identifierReplacements.keys(),
...this.exportBindingsByLocalName.keys(),
]);
}
}
frontend/node_modules/react-router-dom/dist/server.js (Line 43:2 - Line 52:17), frontend/node_modules/react-router-dom/dist/server.mjs (Line 19:2 - Line 28:6)
frontend/node_modules/react-router-dom/dist/server.js (Line 74:2 - Line 98:17), frontend/node_modules/react-router-dom/dist/server.mjs (Line 50:7 - Line 74:6)
,
navigator: getStatelessNavigator(),
static: true,
staticContext: context,
basename: context.basename || "/"
};
let fetchersContext = new Map();
let hydrateScript = "";
if (hydrate !== false) {
let data = {
loaderData: context.loaderData,
actionData: context.actionData,
errors: serializeErrors(context.errors)
};
// Use JSON.parse here instead of embedding a raw JS object here to speed
// up parsing on the client. Dual-stringify is needed to ensure all quotes
// are properly escaped in the resulting string. See:
// https://v8.dev/blog/cost-of-javascript-2019#json
let json = htmlEscape(JSON.stringify(JSON.stringify(data)));
hydrateScript = `window.__staticRouterHydrationData = JSON.parse(${json});`;
}
let {
state
} = dataRouterContext.router;
return /*#__PURE__*/React__namespace
frontend/node_modules/react-router-dom/dist/server.js (Line 134:2 - Line 143:7), frontend/node_modules/react-router-dom/dist/server.mjs (Line 110:2 - Line 119:21)
UNSAFE_useRoutesImpl(routes, undefined, state, future);
}
function serializeErrors(errors) {
if (!errors) return null;
let entries = Object.entries(errors);
let serialized = {};
for (let [key, val] of entries) {
// Hey you! If you change this, please change the corresponding logic in
// deserializeErrors in react-router-dom/index.tsx :)
if (router
frontend/node_modules/react-router-dom/dist/server.js (Line 143:2 - Line 187:7), frontend/node_modules/react-router-dom/dist/server.mjs (Line 119:2 - Line 163:22)
isRouteErrorResponse(val)) {
serialized[key] = {
...val,
__type: "RouteErrorResponse"
};
} else if (val instanceof Error) {
// Do not serialize stack traces from SSR for security reasons
serialized[key] = {
message: val.message,
__type: "Error",
// If this is a subclass (i.e., ReferenceError), send up the type so we
// can re-create the same type during hydration.
...(val.name !== "Error" ? {
__subType: val.name
} : {})
};
} else {
serialized[key] = val;
}
}
return serialized;
}
function getStatelessNavigator() {
return {
createHref,
encodeLocation,
push(to) {
throw new Error(`You cannot use navigator.push() on the server because it is a stateless ` + `environment. This error was probably triggered when you did a ` + `\`navigate(${JSON.stringify(to)})\` somewhere in your app.`);
},
replace(to) {
throw new Error(`You cannot use navigator.replace() on the server because it is a stateless ` + `environment. This error was probably triggered when you did a ` + `\`navigate(${JSON.stringify(to)}, { replace: true })\` somewhere ` + `in your app.`);
},
go(delta) {
throw new Error(`You cannot use navigator.go() on the server because it is a stateless ` + `environment. This error was probably triggered when you did a ` + `\`navigate(${delta})\` somewhere in your app.`);
},
back() {
throw new Error(`You cannot use navigator.back() on the server because it is a stateless ` + `environment.`);
},
forward() {
throw new Error(`You cannot use navigator.forward() on the server because it is a stateless ` + `environment.`);
}
};
}
function createStaticHandler(routes, opts) {
return router
frontend/node_modules/react-router-dom/dist/server.js (Line 194:2 - Line 222:7), frontend/node_modules/react-router-dom/dist/server.mjs (Line 170:2 - Line 199:7)
UNSAFE_mapRouteProperties, undefined, manifest);
// Because our context matches may be from a framework-agnostic set of
// routes passed to createStaticHandler(), we update them here with our
// newly created/enhanced data routes
let matches = context.matches.map(match => {
let route = manifest[match.route.id] || match.route;
return {
...match,
route
};
});
let msg = method => `You cannot use router.${method}() on the server because it is a stateless environment`;
return {
get basename() {
return context.basename;
},
get future() {
return {
v7_fetcherPersist: false,
v7_normalizeFormMethod: false,
v7_partialHydration: opts.future?.v7_partialHydration === true,
v7_prependBasename: false,
v7_relativeSplatPath: opts.future?.v7_relativeSplatPath === true,
v7_skipActionErrorRevalidation: false
};
},
get state() {
return {
historyAction: router
frontend/node_modules/react-router-dom/dist/server.js (Line 229:2 - Line 264:7), frontend/node_modules/react-router-dom/dist/server.mjs (Line 206:2 - Line 241:13)
frontend/node_modules/react-router-dom/dist/server.js (Line 273:2 - Line 289:15), frontend/node_modules/react-router-dom/dist/server.mjs (Line 250:2 - Line 266:11)
IDLE_BLOCKER;
},
deleteBlocker() {
throw msg("deleteBlocker");
},
patchRoutes() {
throw msg("patchRoutes");
},
_internalFetchControllers: new Map(),
_internalActiveDeferreds: new Map(),
_internalSetRoutes() {
throw msg("_internalSetRoutes");
}
};
}
function createHref(to) {
return typeof to === "string" ? to : reactRouterDom
frontend/node_modules/react-router-dom/dist/server.js (Line 292:2 - Line 319:8), frontend/node_modules/react-router-dom/dist/server.mjs (Line 269:2 - Line 297:7)
createPath(to);
// Treating this as a full URL will strip any trailing spaces so we need to
// pre-encode them since they might be part of a matching splat param from
// an ancestor route
href = href.replace(/ $/, "%20");
let encoded = ABSOLUTE_URL_REGEX.test(href) ? new URL(href) : new URL(href, "http://localhost");
return {
pathname: encoded.pathname,
search: encoded.search,
hash: encoded.hash
};
}
const ABSOLUTE_URL_REGEX = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;
// This utility is based on https://github.com/zertosh/htmlescape
// License: https://github.com/zertosh/htmlescape/blob/0527ca7156a524d256101bb310a9f970f63078ad/LICENSE
const ESCAPE_LOOKUP = {
"&": "\\u0026",
">": "\\u003e",
"<": "\\u003c",
"\u2028": "\\u2028",
"\u2029": "\\u2029"
};
const ESCAPE_REGEX = /[&><\u2028\u2029]/g;
function htmlEscape(str) {
return str.replace(ESCAPE_REGEX, match => ESCAPE_LOOKUP[match]);
}
exports
frontend/node_modules/react-refresh/cjs/react-refresh-babel.production.js (Line 454:15 - Line 462:10), frontend/node_modules/react-refresh/cjs/react-refresh-babel.production.js (Line 411:15 - Line 419:5)
frontend/node_modules/react-refresh/cjs/react-refresh-babel.production.js (Line 483:20 - Line 521:3), frontend/node_modules/react-refresh/cjs/react-refresh-babel.production.js (Line 336:6 - Line 374:4)
: function (path) {
var node = path.node,
modulePrefix = "";
switch (path.parent.type) {
case "Program":
var insertAfterPath = path;
var programPath = path.parentPath;
break;
case "TSModuleBlock":
insertAfterPath = path;
programPath = insertAfterPath.parentPath.parentPath;
break;
case "ExportNamedDeclaration":
insertAfterPath = path.parentPath;
programPath = insertAfterPath.parentPath;
break;
case "ExportDefaultDeclaration":
insertAfterPath = path.parentPath;
programPath = insertAfterPath.parentPath;
break;
default:
return;
}
if (
"TSModuleBlock" === path.parent.type ||
"ExportNamedDeclaration" === path.parent.type
)
for (; "Program" !== programPath.type; ) {
if ("TSModuleDeclaration" === programPath.type) {
if (
"Program" !== programPath.parentPath.type &&
"ExportNamedDeclaration" !== programPath.parentPath.type
)
return;
modulePrefix = programPath.node.id.name + "$" + modulePrefix;
}
programPath = programPath.parentPath;
}
if
frontend/node_modules/react-refresh/cjs/react-refresh-babel.development.js (Line 13:2 - Line 601:2), frontend/node_modules/react-refresh/cjs/react-refresh-babel.production.js (Line 12:1 - Line 586:2)
module.exports = function (babel) {
function createRegistration(programPath, persistentID) {
var handle = programPath.scope.generateUidIdentifier("c");
registrationsByProgramPath.has(programPath) ||
registrationsByProgramPath.set(programPath, []);
registrationsByProgramPath
.get(programPath)
.push({ handle: handle, persistentID: persistentID });
return handle;
}
function isComponentishName(name) {
return "string" === typeof name && "A" <= name[0] && "Z" >= name[0];
}
function findInnerComponents(inferredName, path, callback) {
var node = path.node;
switch (node.type) {
case "Identifier":
if (!isComponentishName(node.name)) break;
callback(inferredName, node, null);
return !0;
case "FunctionDeclaration":
return callback(inferredName, node.id, null), !0;
case "ArrowFunctionExpression":
if ("ArrowFunctionExpression" === node.body.type) break;
callback(inferredName, node, path);
return !0;
case "FunctionExpression":
return callback(inferredName, node, path), !0;
case "CallExpression":
var argsPath = path.get("arguments");
if (void 0 === argsPath || 0 === argsPath.length) break;
var calleePath = path.get("callee");
switch (calleePath.node.type) {
case "MemberExpression":
case "Identifier":
calleePath = calleePath.getSource();
if (
!findInnerComponents(
inferredName + "$" + calleePath,
argsPath[0],
callback
)
)
return !1;
callback(inferredName, node, path);
return !0;
default:
return !1;
}
case "VariableDeclarator":
if (
((argsPath = node.init),
null !== argsPath &&
((calleePath = node.id.name), isComponentishName(calleePath)))
) {
switch (argsPath.type) {
case "ArrowFunctionExpression":
case "FunctionExpression":
break;
case "CallExpression":
node = argsPath.callee;
var calleeType = node.type;
if (
"Import" === calleeType ||
("Identifier" === calleeType &&
(0 === node.name.indexOf("require") ||
0 === node.name.indexOf("import")))
)
return !1;
break;
case "TaggedTemplateExpression":
break;
default:
return !1;
}
node = path.get("init");
if (findInnerComponents(inferredName, node, callback)) return !0;
calleePath = path.scope.getBinding(calleePath);
if (void 0 === calleePath) return;
path = !1;
calleePath = calleePath.referencePaths;
for (calleeType = 0; calleeType < calleePath.length; calleeType++) {
var ref = calleePath[calleeType];
if (
!ref.node ||
"JSXIdentifier" === ref.node.type ||
"Identifier" === ref.node.type
) {
ref = ref.parent;
if ("JSXOpeningElement" === ref.type) path = !0;
else if ("CallExpression" === ref.type) {
ref = ref.callee;
var fnName = void 0;
switch (ref.type) {
case "Identifier":
fnName = ref.name;
break;
case "MemberExpression":
fnName = ref.property.name;
}
switch (fnName) {
case "createElement":
case "jsx":
case "jsxDEV":
case "jsxs":
path = !0;
}
}
if (path) return callback(inferredName, argsPath, node), !0;
}
}
}
}
return !1;
}
function getHookCallsSignature(functionNode) {
functionNode = hookCalls.get(functionNode);
return void 0 === functionNode
? null
: {
key: functionNode
.map(function (call) {
return call.name + "{" + call.key + "}";
})
.join("\n"),
customHooks: functionNode
.filter(function (call) {
a: switch (call.name) {
case "useState":
case "React.useState":
case "useReducer":
case "React.useReducer":
case "useEffect":
case "React.useEffect":
case "useLayoutEffect":
case "React.useLayoutEffect":
case "useMemo":
case "React.useMemo":
case "useCallback":
case "React.useCallback":
case "useRef":
case "React.useRef":
case "useContext":
case "React.useContext":
case "useImperativeHandle":
case "React.useImperativeHandle":
case "useDebugValue":
case "React.useDebugValue":
case "useId":
case "React.useId":
case "useDeferredValue":
case "React.useDeferredValue":
case "useTransition":
case "React.useTransition":
case "useInsertionEffect":
case "React.useInsertionEffect":
case "useSyncExternalStore":
case "React.useSyncExternalStore":
case "useFormStatus":
case "React.useFormStatus":
case "useFormState":
case "React.useFormState":
case "useActionState":
case "React.useActionState":
case "useOptimistic":
case "React.useOptimistic":
call = !0;
break a;
default:
call = !1;
}
return !call;
})
.map(function (call) {
return t.cloneDeep(call.callee);
})
};
}
function hasForceResetComment(path) {
path = path.hub.file;
var hasForceReset = hasForceResetCommentByFile.get(path);
if (void 0 !== hasForceReset) return hasForceReset;
hasForceReset = !1;
for (var comments = path.ast.comments, i = 0; i < comments.length; i++)
if (-1 !== comments[i].value.indexOf("@refresh reset")) {
hasForceReset = !0;
break;
}
hasForceResetCommentByFile.set(path, hasForceReset);
return hasForceReset;
}
function createArgumentsForSignature(node, signature, scope) {
var key = signature.key;
signature = signature.customHooks;
var forceReset = hasForceResetComment(scope.path),
customHooksInScope = [];
signature.forEach(function (callee) {
switch (callee.type) {
case "MemberExpression":
if ("Identifier" === callee.object.type)
var bindingName = callee.object.name;
break;
case "Identifier":
bindingName = callee.name;
}
scope.hasBinding(bindingName)
? customHooksInScope.push(callee)
: (forceReset = !0);
});
signature = key;
"function" !== typeof require ||
opts.emitFullSignatures ||
(signature = require("crypto")
.createHash("sha1")
.update(key)
.digest("base64"));
node = [node, t.stringLiteral(signature)];
(forceReset || 0 < customHooksInScope.length) &&
node.push(t.booleanLiteral(forceReset));
0 < customHooksInScope.length &&
node.push(
t.functionExpression(
null,
[],
t.blockStatement([
t.returnStatement(t.arrayExpression(customHooksInScope))
])
)
);
return node;
}
function findHOCCallPathsAbove(path) {
for (var calls = []; ; ) {
if (!path) return calls;
var parentPath = path.parentPath;
if (!parentPath) return calls;
if (
"AssignmentExpression" === parentPath.node.type &&
path.node === parentPath.node.right
)
path = parentPath;
else if (
"CallExpression" === parentPath.node.type &&
path.node !== parentPath.node.callee
)
calls.push(parentPath), (path = parentPath);
else return calls;
}
}
var opts =
1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : {};
if ("function" === typeof babel.env) {
var env = babel.env();
if ("development" !== env && !opts.skipEnvCheck)
throw Error(
'React Refresh Babel transform should only be enabled in development environment. Instead, the environment is: "' +
env +
'". If you want to override this check, pass {skipEnvCheck: true} as plugin options.'
);
}
var t = babel.types,
refreshReg = t.identifier(opts.refreshReg || "$RefreshReg$"),
refreshSig = t.identifier(opts.refreshSig || "$RefreshSig$"),
registrationsByProgramPath = new Map(),
hasForceResetCommentByFile = new WeakMap(),
seenForRegistration = new WeakSet(),
seenForSignature = new WeakSet(),
seenForOutro = new WeakSet(),
hookCalls = new WeakMap(),
HookCallsVisitor = {
CallExpression: function (path) {
var callee = path.node.callee,
name = null;
switch (callee.type) {
case "Identifier":
name = callee.name;
break;
case "MemberExpression":
name = callee.property.name;
}
if (
null !== name &&
/^use[A-Z]/.test(name) &&
((callee = path.scope.getFunctionParent()), null !== callee)
) {
callee = callee.block;
hookCalls.has(callee) || hookCalls.set(callee, []);
callee = hookCalls.get(callee);
var key = "";
"VariableDeclarator" === path.parent.type &&
(key = path.parentPath.get("id").getSource());
var args = path.get("arguments");
"useState" === name && 0 < args.length
? (key += "(" + args[0].getSource() + ")")
: "useReducer" === name &&
1 < args.length &&
(key += "(" + args[1].getSource() + ")");
callee.push({ callee: path.node.callee, name: name, key: key });
}
}
};
return {
visitor: {
ExportDefaultDeclaration: function (path) {
var node = path.node,
decl = node.declaration,
declPath = path.get("declaration");
if (
"CallExpression" === decl.type &&
!seenForRegistration.has(node)
) {
seenForRegistration.add(node);
var programPath = path.parentPath;
findInnerComponents(
"%default%",
declPath,
function (persistentID, targetExpr, targetPath) {
null !== targetPath &&
((persistentID = createRegistration(
programPath,
persistentID
)),
targetPath.replaceWith(
t.assignmentExpression("=", persistentID, targetExpr)
));
}
);
}
},
FunctionDeclaration: {
enter: function (path) {
var node = path.node,
modulePrefix = "";
switch (path.parent.type) {
case "Program":
var insertAfterPath = path;
var programPath = path.parentPath;
break;
case "TSModuleBlock":
insertAfterPath = path;
programPath = insertAfterPath.parentPath.parentPath;
break;
case "ExportNamedDeclaration":
insertAfterPath = path.parentPath;
programPath = insertAfterPath.parentPath;
break;
case "ExportDefaultDeclaration":
insertAfterPath = path.parentPath;
programPath = insertAfterPath.parentPath;
break;
default:
return;
}
if (
"TSModuleBlock" === path.parent.type ||
"ExportNamedDeclaration" === path.parent.type
)
for (; "Program" !== programPath.type; ) {
if ("TSModuleDeclaration" === programPath.type) {
if (
"Program" !== programPath.parentPath.type &&
"ExportNamedDeclaration" !== programPath.parentPath.type
)
return;
modulePrefix = programPath.node.id.name + "$" + modulePrefix;
}
programPath = programPath.parentPath;
}
var id = node.id;
null !== id &&
((id = id.name),
isComponentishName(id) &&
!seenForRegistration.has(node) &&
(seenForRegistration.add(node),
findInnerComponents(
modulePrefix + id,
path,
function (persistentID, targetExpr) {
persistentID = createRegistration(
programPath,
persistentID
);
insertAfterPath.insertAfter(
t.expressionStatement(
t.assignmentExpression("=", persistentID, targetExpr)
)
);
}
)));
},
exit: function (path) {
var node = path.node,
id = node.id;
if (null !== id) {
var signature = getHookCallsSignature(node);
if (null !== signature && !seenForSignature.has(node)) {
seenForSignature.add(node);
node = path.scope.generateUidIdentifier("_s");
path.scope.parent.push({
id: node,
init: t.callExpression(refreshSig, [])
});
path
.get("body")
.unshiftContainer(
"body",
t.expressionStatement(t.callExpression(node, []))
);
var insertAfterPath = null;
path.find(function (p) {
if (p.parentPath.isBlock()) return (insertAfterPath = p), !0;
});
null !== insertAfterPath &&
insertAfterPath.insertAfter(
t.expressionStatement(
t.callExpression(
node,
createArgumentsForSignature(
id,
signature,
insertAfterPath.scope
)
)
)
);
}
}
}
},
"ArrowFunctionExpression|FunctionExpression": {
exit: function (path) {
var node = path.node,
signature = getHookCallsSignature(node);
if (null !== signature && !seenForSignature.has(node)) {
seenForSignature.add(node);
var sigCallID = path.scope.generateUidIdentifier("_s");
path.scope.parent.push({
id: sigCallID,
init: t.callExpression(refreshSig, [])
});
"BlockStatement" !== path.node.body.type &&
(path.node.body = t.blockStatement([
t.returnStatement(path.node.body)
]));
path
.get("body")
.unshiftContainer(
"body",
t.expressionStatement(t.callExpression(sigCallID, []))
);
if ("VariableDeclarator" === path.parent.type) {
var insertAfterPath = null;
path.find(function (p) {
if (p.parentPath.isBlock()) return (insertAfterPath = p), !0;
});
null !== insertAfterPath &&
insertAfterPath.insertAfter(
t.expressionStatement(
t.callExpression(
sigCallID,
createArgumentsForSignature(
path.parent.id,
signature,
insertAfterPath.scope
)
)
)
);
} else
[path]
.concat(findHOCCallPathsAbove(path))
.forEach(function (p) {
p.replaceWith(
t.callExpression(
sigCallID,
createArgumentsForSignature(p.node, signature, p.scope)
)
);
});
}
}
},
VariableDeclaration: function (path) {
var node = path.node,
modulePrefix = "";
switch (path.parent.type) {
case "Program":
var insertAfterPath = path;
var programPath = path.parentPath;
break;
case "TSModuleBlock":
insertAfterPath = path;
programPath = insertAfterPath.parentPath.parentPath;
break;
case "ExportNamedDeclaration":
insertAfterPath = path.parentPath;
programPath = insertAfterPath.parentPath;
break;
case "ExportDefaultDeclaration":
insertAfterPath = path.parentPath;
programPath = insertAfterPath.parentPath;
break;
default:
return;
}
if (
"TSModuleBlock" === path.parent.type ||
"ExportNamedDeclaration" === path.parent.type
)
for (; "Program" !== programPath.type; ) {
if ("TSModuleDeclaration" === programPath.type) {
if (
"Program" !== programPath.parentPath.type &&
"ExportNamedDeclaration" !== programPath.parentPath.type
)
return;
modulePrefix = programPath.node.id.name + "$" + modulePrefix;
}
programPath = programPath.parentPath;
}
if (
!seenForRegistration.has(node) &&
(seenForRegistration.add(node),
(path = path.get("declarations")),
1 === path.length)
) {
var declPath = path[0];
findInnerComponents(
modulePrefix + declPath.node.id.name,
declPath,
function (persistentID, targetExpr, targetPath) {
null !== targetPath &&
((persistentID = createRegistration(
programPath,
persistentID
)),
"VariableDeclarator" === targetPath.parent.type
? insertAfterPath.insertAfter(
t.expressionStatement(
t.assignmentExpression(
"=",
persistentID,
declPath.node.id
)
)
)
: targetPath.replaceWith(
t.assignmentExpression("=", persistentID, targetExpr)
));
}
);
}
},
Program: {
enter: function (path) {
path.traverse(HookCallsVisitor);
},
exit: function (path) {
var registrations = registrationsByProgramPath.get(path);
if (void 0 !== registrations) {
var node = path.node;
if (!seenForOutro.has(node)) {
seenForOutro.add(node);
registrationsByProgramPath.delete(path);
var declarators = [];
path.pushContainer(
"body",
t.variableDeclaration("var", declarators)
);
registrations.forEach(function (_ref) {
var handle = _ref.handle;
path.pushContainer(
"body",
t.expressionStatement(
t.callExpression(refreshReg, [
handle,
t.stringLiteral(_ref.persistentID)
])
)
);
declarators.push(t.variableDeclarator(handle));
});
}
}
}
}
}
};
})
frontend/node_modules/postcss-value-parser/lib/walk.js (Line 1:1 - Line 22:2), frontend/node_modules/tailwindcss/lib/value-parser/walk.js (Line 2:1 - Line 16:2)
module.exports = function walk(nodes, cb, bubble) {
var i, max, node, result;
for (i = 0, max = nodes.length; i < max; i += 1) {
node = nodes[i];
if (!bubble) {
result = cb(node, i, nodes);
}
if (
result !== false &&
node.type === "function" &&
Array.isArray(node.nodes)
) {
walk(node.nodes, cb, bubble);
}
if (bubble) {
cb(node, i, nodes);
}
}
};
frontend/node_modules/postcss-value-parser/lib/unit.js (Line 1:1 - Line 98:2), frontend/node_modules/tailwindcss/lib/value-parser/unit.js (Line 2:1 - Line 72:9)
var minus = "-".charCodeAt(0);
var plus = "+".charCodeAt(0);
var dot = ".".charCodeAt(0);
var exp = "e".charCodeAt(0);
var EXP = "E".charCodeAt(0);
// Check if three code points would start a number
// https://www.w3.org/TR/css-syntax-3/#starts-with-a-number
function likeNumber(value) {
var code = value.charCodeAt(0);
var nextCode;
if (code === plus || code === minus) {
nextCode = value.charCodeAt(1);
if (nextCode >= 48 && nextCode <= 57) {
return true;
}
var nextNextCode = value.charCodeAt(2);
if (nextCode === dot && nextNextCode >= 48 && nextNextCode <= 57) {
return true;
}
return false;
}
if (code === dot) {
nextCode = value.charCodeAt(1);
if (nextCode >= 48 && nextCode <= 57) {
return true;
}
return false;
}
if (code >= 48 && code <= 57) {
return true;
}
return false;
}
// Consume a number
// https://www.w3.org/TR/css-syntax-3/#consume-number
module.exports = function(value) {
var pos = 0;
var length = value.length;
var code;
var nextCode;
var nextNextCode;
if (length === 0 || !likeNumber(value)) {
return false;
}
code = value.charCodeAt(pos);
if (code === plus || code === minus) {
pos++;
}
while (pos < length) {
code = value.charCodeAt(pos);
if (code < 48 || code > 57) {
break;
}
pos += 1;
}
code = value.charCodeAt(pos);
nextCode = value.charCodeAt(pos + 1);
if (code === dot && nextCode >= 48 && nextCode <= 57) {
pos += 2;
while (pos < length) {
code = value.charCodeAt(pos);
if (code < 48 || code > 57) {
break;
}
pos += 1;
}
}
code = value.charCodeAt(pos);
nextCode = value.charCodeAt(pos + 1);
nextNextCode = value.charCodeAt(pos + 2);
if (
(code === exp || code === EXP) &&
((
frontend/node_modules/postcss-value-parser/lib/unit.js (Line 96:3 - Line 103:2), frontend/node_modules/tailwindcss/src/value-parser/unit.js (Line 96:3 - Line 103:6)
frontend/node_modules/postcss-value-parser/lib/stringify.js (Line 1:1 - Line 23:2), frontend/node_modules/tailwindcss/lib/value-parser/stringify.js (Line 2:1 - Line 23:6)
function stringifyNode(node, custom) {
var type = node.type;
var value = node.value;
var buf;
var customResult;
if (custom && (customResult = custom(node)) !== undefined) {
return customResult;
} else if (type === "word" || type === "space") {
return value;
} else if (type === "string") {
buf = node.quote || "";
return buf + value + (node.unclosed ? "" : buf);
} else if (type === "comment") {
return "/*" + value + (node.unclosed ? "" : "*/");
} else if (type === "div") {
return (node.before || "") + value + (node.after || "");
} else if (Array.isArray(node.nodes)) {
buf = stringify(node.nodes, custom);
if (type !== "function") {
return buf;
}
return (
frontend/node_modules/postcss-value-parser/lib/stringify.js (Line 30:5 - Line 48:2), frontend/node_modules/tailwindcss/lib/value-parser/stringify.js (Line 23:4 - Line 38:2)
);
}
return value;
}
function stringify(nodes, custom) {
var result, i;
if (Array.isArray(nodes)) {
result = "";
for (i = nodes.length - 1; ~i; i -= 1) {
result = stringifyNode(nodes[i], custom) + result;
}
return result;
}
return stringifyNode(nodes, custom);
}
module.exports = stringify;
frontend/node_modules/postcss-value-parser/lib/parse.js (Line 1:1 - Line 57:2), frontend/node_modules/tailwindcss/lib/value-parser/parse.js (Line 2:1 - Line 47:5)
var openParentheses = "(".charCodeAt(0);
var closeParentheses = ")".charCodeAt(0);
var singleQuote = "'".charCodeAt(0);
var doubleQuote = '"'.charCodeAt(0);
var backslash = "\\".charCodeAt(0);
var slash = "/".charCodeAt(0);
var comma = ",".charCodeAt(0);
var colon = ":".charCodeAt(0);
var star = "*".charCodeAt(0);
var uLower = "u".charCodeAt(0);
var uUpper = "U".charCodeAt(0);
var plus = "+".charCodeAt(0);
var isUnicodeRange = /^[a-f0-9?-]+$/i;
module.exports = function(input) {
var tokens = [];
var value = input;
var next,
quote,
prev,
token,
escape,
escapePos,
whitespacePos,
parenthesesOpenPos;
var pos = 0;
var code = value.charCodeAt(pos);
var max = value.length;
var stack = [{ nodes: tokens }];
var balanced = 0;
var parent;
var name = "";
var before = "";
var after = "";
while (pos < max) {
// Whitespaces
if (code <= 32) {
next = pos;
do {
next += 1;
code = value.charCodeAt(next);
} while (code <= 32);
token = value.slice(pos, next);
prev = tokens[tokens.length - 1];
if (code === closeParentheses && balanced) {
after = token;
} else if (prev && prev.type === "div") {
prev.after = token;
prev.sourceEndIndex += token.length;
} else if (
code === comma ||
code === colon ||
(
frontend/node_modules/postcss-value-parser/lib/parse.js (Line 60:2 - Line 131:7), frontend/node_modules/tailwindcss/lib/value-parser/parse.js (Line 47:6 - Line 105:5)
)
) {
before = token;
} else {
tokens.push({
type: "space",
sourceIndex: pos,
sourceEndIndex: next,
value: token
});
}
pos = next;
// Quotes
} else if (code === singleQuote || code === doubleQuote) {
next = pos;
quote = code === singleQuote ? "'" : '"';
token = {
type: "string",
sourceIndex: pos,
quote: quote
};
do {
escape = false;
next = value.indexOf(quote, next + 1);
if (~next) {
escapePos = next;
while (value.charCodeAt(escapePos - 1) === backslash) {
escapePos -= 1;
escape = !escape;
}
} else {
value += quote;
next = value.length - 1;
token.unclosed = true;
}
} while (escape);
token.value = value.slice(pos + 1, next);
token.sourceEndIndex = token.unclosed ? next : next + 1;
tokens.push(token);
pos = next + 1;
code = value.charCodeAt(pos);
// Comments
} else if (code === slash && value.charCodeAt(pos + 1) === star) {
next = value.indexOf("*/", pos);
token = {
type: "comment",
sourceIndex: pos,
sourceEndIndex: next + 2
};
if (next === -1) {
token.unclosed = true;
next = value.length;
token.sourceEndIndex = next;
}
token.value = value.slice(pos + 2, next);
tokens.push(token);
pos = next + 2;
code = value.charCodeAt(pos);
// Operation within calc
} else if (
(code === slash || code === star) &&
parent &&
parent.type === "function" &&
parent
frontend/node_modules/postcss-value-parser/lib/parse.js (Line 132:5 - Line 277:2), frontend/node_modules/tailwindcss/lib/value-parser/parse.js (Line 105:5 - Line 232:5)
frontend/node_modules/.vite/deps/zustand_middleware.js (Line 39:2 - Line 209:4), frontend/node_modules/zustand/esm/middleware.mjs (Line 37:2 - Line 214:6)
devtoolsImpl = (fn, devtoolsOptions = {}) => (set, get, api) => {
const { enabled, anonymousActionType, store, ...options } = devtoolsOptions;
let extensionConnector;
try {
extensionConnector = (enabled != null ? enabled : (import.meta.env ? import.meta.env.MODE : void 0) !== "production") && window.__REDUX_DEVTOOLS_EXTENSION__;
} catch (_e) {
}
if (!extensionConnector) {
if ((import.meta.env ? import.meta.env.MODE : void 0) !== "production" && enabled) {
console.warn(
"[zustand devtools middleware] Please install/enable Redux devtools extension"
);
}
return fn(set, get, api);
}
const { connection, ...connectionInformation } = extractConnectionInformation(store, extensionConnector, options);
let isRecording = true;
api.setState = (state, replace, nameOrAction) => {
const r = set(state, replace);
if (!isRecording) return r;
const action = nameOrAction === void 0 ? { type: anonymousActionType || "anonymous" } : typeof nameOrAction === "string" ? { type: nameOrAction } : nameOrAction;
if (store === void 0) {
connection == null ? void 0 : connection.send(action, get());
return r;
}
connection == null ? void 0 : connection.send(
{
...action,
type: `${store}/${action.type}`
},
{
...getTrackedConnectionState(options.name),
[store]: api.getState()
}
);
return r;
};
const setStateFromDevtools = (...a) => {
const originalIsRecording = isRecording;
isRecording = false;
set(...a);
isRecording = originalIsRecording;
};
const initialState = fn(api.setState, get, api);
if (connectionInformation.type === "untracked") {
connection == null ? void 0 : connection.init(initialState);
} else {
connectionInformation.stores[connectionInformation.store] = api;
connection == null ? void 0 : connection.init(
Object.fromEntries(
Object.entries(connectionInformation.stores).map(([key, store2]) => [
key,
key === connectionInformation.store ? initialState : store2.getState()
])
)
);
}
if (api.dispatchFromDevtools && typeof api.dispatch === "function") {
let didWarnAboutReservedActionType = false;
const originalDispatch = api.dispatch;
api.dispatch = (...a) => {
if ((import.meta.env ? import.meta.env.MODE : void 0) !== "production" && a[0].type === "__setState" && !didWarnAboutReservedActionType) {
console.warn(
'[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'
);
didWarnAboutReservedActionType = true;
}
originalDispatch(...a);
};
}
connection.subscribe((message) => {
var _a;
switch (message.type) {
case "ACTION":
if (typeof message.payload !== "string") {
console.error(
"[zustand devtools middleware] Unsupported action format"
);
return;
}
return parseJsonThen(
message.payload,
(action) => {
if (action.type === "__setState") {
if (store === void 0) {
setStateFromDevtools(action.state);
return;
}
if (Object.keys(action.state).length !== 1) {
console.error(
`
[zustand devtools middleware] Unsupported __setState action format.
When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),
and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }
`
);
}
const stateFromDevtools = action.state[store];
if (stateFromDevtools === void 0 || stateFromDevtools === null) {
return;
}
if (JSON.stringify(api.getState()) !== JSON.stringify(stateFromDevtools)) {
setStateFromDevtools(stateFromDevtools);
}
return;
}
if (!api.dispatchFromDevtools) return;
if (typeof api.dispatch !== "function") return;
api.dispatch(action);
}
);
case "DISPATCH":
switch (message.payload.type) {
case "RESET":
setStateFromDevtools(initialState);
if (store === void 0) {
return connection == null ? void 0 : connection.init(api.getState());
}
return connection == null ? void 0 : connection.init(getTrackedConnectionState(options.name));
case "COMMIT":
if (store === void 0) {
connection == null ? void 0 : connection.init(api.getState());
return;
}
return connection == null ? void 0 : connection.init(getTrackedConnectionState(options.name));
case "ROLLBACK":
return parseJsonThen(message.state, (state) => {
if (store === void 0) {
setStateFromDevtools(state);
connection == null ? void 0 : connection.init(api.getState());
return;
}
setStateFromDevtools(state[store]);
connection == null ? void 0 : connection.init(getTrackedConnectionState(options.name));
});
case "JUMP_TO_STATE":
case "JUMP_TO_ACTION":
return parseJsonThen(message.state, (state) => {
if (store === void 0) {
setStateFromDevtools(state);
return;
}
if (JSON.stringify(api.getState()) !== JSON.stringify(state[store])) {
setStateFromDevtools(state[store]);
}
});
case "IMPORT_STATE": {
const { nextLiftedState } = message.payload;
const lastComputedState = (_a = nextLiftedState.computedStates.slice(-1)[0]) == null ? void 0 : _a.state;
if (!lastComputedState) return;
if (store === void 0) {
setStateFromDevtools(lastComputedState);
} else {
setStateFromDevtools(lastComputedState[store]);
}
connection == null ? void 0 : connection.send(
null,
// FIXME no-any
nextLiftedState
);
return;
}
case "PAUSE_RECORDING":
return isRecording = !isRecording;
}
return;
}
});
return initialState;
};
var
frontend/node_modules/.vite/deps/zustand_middleware.js (Line 210:2 - Line 222:4), frontend/node_modules/zustand/system/middleware.development.js (Line 215:2 - Line 228:6)
parseJsonThen = (stringified, f) => {
let parsed;
try {
parsed = JSON.parse(stringified);
} catch (e) {
console.error(
"[zustand devtools middleware] Could not parse the received json",
e
);
}
if (parsed !== void 0) f(parsed);
};
var
frontend/node_modules/.vite/deps/zustand_middleware.js (Line 222:2 - Line 245:4), frontend/node_modules/zustand/system/middleware.development.js (Line 228:2 - Line 251:6)
frontend/node_modules/.vite/deps/zustand.js (Line 165:2 - Line 194:4), frontend/node_modules/zustand/system/vanilla.development.js (Line 6:2 - Line 35:6)
createStoreImpl = (createState) => {
let state;
const listeners = /* @__PURE__ */ new Set();
const setState = (partial, replace) => {
const nextState = typeof partial === "function" ? partial(state) : partial;
if (!Object.is(nextState, state)) {
const previousState = state;
state = (replace != null ? replace : typeof nextState !== "object" || nextState === null) ? nextState : Object.assign({}, state, nextState);
listeners.forEach((listener) => listener(state, previousState));
}
};
const getState = () => state;
const getInitialState = () => initialState;
const subscribe = (listener) => {
listeners.add(listener);
return () => listeners.delete(listener);
};
const destroy = () => {
if ((import.meta.env ? import.meta.env.MODE : void 0) !== "production") {
console.warn(
"[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."
);
}
listeners.clear();
};
const api = { setState, getState, getInitialState, subscribe, destroy };
const initialState = state = createState(setState, getState, api);
return api;
};
var
frontend/node_modules/.vite/deps/zustand.js (Line 202:2 - Line 220:4), frontend/node_modules/zustand/esm/index.mjs (Line 9:2 - Line 48:6)
identity = (arg) => arg;
function useStore(api, selector = identity, equalityFn) {
if ((import.meta.env ? import.meta.env.MODE : void 0) !== "production" && equalityFn && !didWarnAboutEqualityFn) {
console.warn(
"[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"
);
didWarnAboutEqualityFn = true;
}
const slice = useSyncExternalStoreWithSelector(
api.subscribe,
api.getState,
api.getServerState || api.getInitialState,
selector,
equalityFn
);
useDebugValue(slice);
return slice;
}
var
frontend/node_modules/.vite/deps/zustand.js (Line 220:2 - Line 231:4), frontend/node_modules/zustand/esm/index.mjs (Line 27:2 - Line 59:6)
createImpl = (createState) => {
if ((import.meta.env ? import.meta.env.MODE : void 0) !== "production" && typeof createState !== "function") {
console.warn(
"[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`."
);
}
const api = typeof createState === "function" ? createStore(createState) : createState;
const useBoundStore = (selector, equalityFn) => useStore(api, selector, equalityFn);
Object.assign(useBoundStore, api);
return useBoundStore;
};
var
frontend/node_modules/.vite/deps/zustand.js (Line 231:2 - Line 242:12), frontend/node_modules/zustand/esm/index.mjs (Line 38:2 - Line 48:6)
create = (createState) => createState ? createImpl(createState) : createImpl;
var react = (createState) => {
if ((import.meta.env ? import.meta.env.MODE : void 0) !== "production") {
console.warn(
"[DEPRECATED] Default export is deprecated. Instead use `import { create } from 'zustand'`."
);
}
return create(createState);
};
export {
create,
createStore
frontend/node_modules/.vite/deps/chunk-NUE7YGWH.js (Line 10:61 - Line 866:9), frontend/node_modules/.vite/deps/react_jsx-dev-runtime.js (Line 10:65 - Line 866:4)
(exports) {
"use strict";
if (true) {
(function() {
"use strict";
var React = require_react();
var REACT_ELEMENT_TYPE = Symbol.for("react.element");
var REACT_PORTAL_TYPE = Symbol.for("react.portal");
var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode");
var REACT_PROFILER_TYPE = Symbol.for("react.profiler");
var REACT_PROVIDER_TYPE = Symbol.for("react.provider");
var REACT_CONTEXT_TYPE = Symbol.for("react.context");
var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref");
var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense");
var REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list");
var REACT_MEMO_TYPE = Symbol.for("react.memo");
var REACT_LAZY_TYPE = Symbol.for("react.lazy");
var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen");
var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
var FAUX_ITERATOR_SYMBOL = "@@iterator";
function getIteratorFn(maybeIterable) {
if (maybeIterable === null || typeof maybeIterable !== "object") {
return null;
}
var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
if (typeof maybeIterator === "function") {
return maybeIterator;
}
return null;
}
var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
function error(format) {
{
{
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
args[_key2 - 1] = arguments[_key2];
}
printWarning("error", format, args);
}
}
}
function printWarning(level, format, args) {
{
var ReactDebugCurrentFrame2 = ReactSharedInternals.ReactDebugCurrentFrame;
var stack = ReactDebugCurrentFrame2.getStackAddendum();
if (stack !== "") {
format += "%s";
args = args.concat([stack]);
}
var argsWithFormat = args.map(function(item) {
return String(item);
});
argsWithFormat.unshift("Warning: " + format);
Function.prototype.apply.call(console[level], console, argsWithFormat);
}
}
var enableScopeAPI = false;
var enableCacheElement = false;
var enableTransitionTracing = false;
var enableLegacyHidden = false;
var enableDebugTracing = false;
var REACT_MODULE_REFERENCE;
{
REACT_MODULE_REFERENCE = Symbol.for("react.module.reference");
}
function isValidElementType(type) {
if (typeof type === "string" || typeof type === "function") {
return true;
}
if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing) {
return true;
}
if (typeof type === "object" && type !== null) {
if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
// types supported by any Flight configuration anywhere since
// we don't know which Flight build this will end up being used
// with.
type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== void 0) {
return true;
}
}
return false;
}
function getWrappedName(outerType, innerType, wrapperName) {
var displayName = outerType.displayName;
if (displayName) {
return displayName;
}
var functionName = innerType.displayName || innerType.name || "";
return functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName;
}
function getContextName(type) {
return type.displayName || "Context";
}
function getComponentNameFromType(type) {
if (type == null) {
return null;
}
{
if (typeof type.tag === "number") {
error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.");
}
}
if (typeof type === "function") {
return type.displayName || type.name || null;
}
if (typeof type === "string") {
return type;
}
switch (type) {
case REACT_FRAGMENT_TYPE:
return "Fragment";
case REACT_PORTAL_TYPE:
return "Portal";
case REACT_PROFILER_TYPE:
return "Profiler";
case REACT_STRICT_MODE_TYPE:
return "StrictMode";
case REACT_SUSPENSE_TYPE:
return "Suspense";
case REACT_SUSPENSE_LIST_TYPE:
return "SuspenseList";
}
if (typeof type === "object") {
switch (type.$$typeof) {
case REACT_CONTEXT_TYPE:
var context = type;
return getContextName(context) + ".Consumer";
case REACT_PROVIDER_TYPE:
var provider = type;
return getContextName(provider._context) + ".Provider";
case REACT_FORWARD_REF_TYPE:
return getWrappedName(type, type.render, "ForwardRef");
case REACT_MEMO_TYPE:
var outerName = type.displayName || null;
if (outerName !== null) {
return outerName;
}
return getComponentNameFromType(type.type) || "Memo";
case REACT_LAZY_TYPE: {
var lazyComponent = type;
var payload = lazyComponent._payload;
var init = lazyComponent._init;
try {
return getComponentNameFromType(init(payload));
} catch (x) {
return null;
}
}
}
}
return null;
}
var assign = Object.assign;
var disabledDepth = 0;
var prevLog;
var prevInfo;
var prevWarn;
var prevError;
var prevGroup;
var prevGroupCollapsed;
var prevGroupEnd;
function disabledLog() {
}
disabledLog.__reactDisabledLog = true;
function disableLogs() {
{
if (disabledDepth === 0) {
prevLog = console.log;
prevInfo = console.info;
prevWarn = console.warn;
prevError = console.error;
prevGroup = console.group;
prevGroupCollapsed = console.groupCollapsed;
prevGroupEnd = console.groupEnd;
var props = {
configurable: true,
enumerable: true,
value: disabledLog,
writable: true
};
Object.defineProperties(console, {
info: props,
log: props,
warn: props,
error: props,
group: props,
groupCollapsed: props,
groupEnd: props
});
}
disabledDepth++;
}
}
function reenableLogs() {
{
disabledDepth--;
if (disabledDepth === 0) {
var props = {
configurable: true,
enumerable: true,
writable: true
};
Object.defineProperties(console, {
log: assign({}, props, {
value: prevLog
}),
info: assign({}, props, {
value: prevInfo
}),
warn: assign({}, props, {
value: prevWarn
}),
error: assign({}, props, {
value: prevError
}),
group: assign({}, props, {
value: prevGroup
}),
groupCollapsed: assign({}, props, {
value: prevGroupCollapsed
}),
groupEnd: assign({}, props, {
value: prevGroupEnd
})
});
}
if (disabledDepth < 0) {
error("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
}
}
}
var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
var prefix;
function describeBuiltInComponentFrame(name, source, ownerFn) {
{
if (prefix === void 0) {
try {
throw Error();
} catch (x) {
var match = x.stack.trim().match(/\n( *(at )?)/);
prefix = match && match[1] || "";
}
}
return "\n" + prefix + name;
}
}
var reentry = false;
var componentFrameCache;
{
var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map;
componentFrameCache = new PossiblyWeakMap();
}
function describeNativeComponentFrame(fn, construct) {
if (!fn || reentry) {
return "";
}
{
var frame = componentFrameCache.get(fn);
if (frame !== void 0) {
return frame;
}
}
var control;
reentry = true;
var previousPrepareStackTrace = Error.prepareStackTrace;
Error.prepareStackTrace = void 0;
var previousDispatcher;
{
previousDispatcher = ReactCurrentDispatcher.current;
ReactCurrentDispatcher.current = null;
disableLogs();
}
try {
if (construct) {
var Fake = function() {
throw Error();
};
Object.defineProperty(Fake.prototype, "props", {
set: function() {
throw Error();
}
});
if (typeof Reflect === "object" && Reflect.construct) {
try {
Reflect.construct(Fake, []);
} catch (x) {
control = x;
}
Reflect.construct(fn, [], Fake);
} else {
try {
Fake.call();
} catch (x) {
control = x;
}
fn.call(Fake.prototype);
}
} else {
try {
throw Error();
} catch (x) {
control = x;
}
fn();
}
} catch (sample) {
if (sample && control && typeof sample.stack === "string") {
var sampleLines = sample.stack.split("\n");
var controlLines = control.stack.split("\n");
var s = sampleLines.length - 1;
var c = controlLines.length - 1;
while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
c--;
}
for (; s >= 1 && c >= 0; s--, c--) {
if (sampleLines[s] !== controlLines[c]) {
if (s !== 1 || c !== 1) {
do {
s--;
c--;
if (c < 0 || sampleLines[s] !== controlLines[c]) {
var _frame = "\n" + sampleLines[s].replace(" at new ", " at ");
if (fn.displayName && _frame.includes("<anonymous>")) {
_frame = _frame.replace("<anonymous>", fn.displayName);
}
{
if (typeof fn === "function") {
componentFrameCache.set(fn, _frame);
}
}
return _frame;
}
} while (s >= 1 && c >= 0);
}
break;
}
}
}
} finally {
reentry = false;
{
ReactCurrentDispatcher.current = previousDispatcher;
reenableLogs();
}
Error.prepareStackTrace = previousPrepareStackTrace;
}
var name = fn ? fn.displayName || fn.name : "";
var syntheticFrame = name ? describeBuiltInComponentFrame(name) : "";
{
if (typeof fn === "function") {
componentFrameCache.set(fn, syntheticFrame);
}
}
return syntheticFrame;
}
function describeFunctionComponentFrame(fn, source, ownerFn) {
{
return describeNativeComponentFrame(fn, false);
}
}
function shouldConstruct(Component) {
var prototype = Component.prototype;
return !!(prototype && prototype.isReactComponent);
}
function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
if (type == null) {
return "";
}
if (typeof type === "function") {
{
return describeNativeComponentFrame(type, shouldConstruct(type));
}
}
if (typeof type === "string") {
return describeBuiltInComponentFrame(type);
}
switch (type) {
case REACT_SUSPENSE_TYPE:
return describeBuiltInComponentFrame("Suspense");
case REACT_SUSPENSE_LIST_TYPE:
return describeBuiltInComponentFrame("SuspenseList");
}
if (typeof type === "object") {
switch (type.$$typeof) {
case REACT_FORWARD_REF_TYPE:
return describeFunctionComponentFrame(type.render);
case REACT_MEMO_TYPE:
return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
case REACT_LAZY_TYPE: {
var lazyComponent = type;
var payload = lazyComponent._payload;
var init = lazyComponent._init;
try {
return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
} catch (x) {
}
}
}
}
return "";
}
var hasOwnProperty = Object.prototype.hasOwnProperty;
var loggedTypeFailures = {};
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
function setCurrentlyValidatingElement(element) {
{
if (element) {
var owner = element._owner;
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
ReactDebugCurrentFrame.setExtraStackFrame(stack);
} else {
ReactDebugCurrentFrame.setExtraStackFrame(null);
}
}
}
function checkPropTypes(typeSpecs, values, location, componentName, element) {
{
var has = Function.call.bind(hasOwnProperty);
for (var typeSpecName in typeSpecs) {
if (has(typeSpecs, typeSpecName)) {
var error$1 = void 0;
try {
if (typeof typeSpecs[typeSpecName] !== "function") {
var err = Error((componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
err.name = "Invariant Violation";
throw err;
}
error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
} catch (ex) {
error$1 = ex;
}
if (error$1 && !(error$1 instanceof Error)) {
setCurrentlyValidatingElement(element);
error("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", componentName || "React class", location, typeSpecName, typeof error$1);
setCurrentlyValidatingElement(null);
}
if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
loggedTypeFailures[error$1.message] = true;
setCurrentlyValidatingElement(element);
error("Failed %s type: %s", location, error$1.message);
setCurrentlyValidatingElement(null);
}
}
}
}
}
var isArrayImpl = Array.isArray;
function isArray(a) {
return isArrayImpl(a);
}
function typeName(value) {
{
var hasToStringTag = typeof Symbol === "function" && Symbol.toStringTag;
var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
return type;
}
}
function willCoercionThrow(value) {
{
try {
testStringCoercion(value);
return false;
} catch (e) {
return true;
}
}
}
function testStringCoercion(value) {
return "" + value;
}
function checkKeyStringCoercion(value) {
{
if (willCoercionThrow(value)) {
error("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", typeName(value));
return testStringCoercion(value);
}
}
}
var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
var RESERVED_PROPS = {
key: true,
ref: true,
__self: true,
__source: true
};
var specialPropKeyWarningShown;
var specialPropRefWarningShown;
var didWarnAboutStringRefs;
{
didWarnAboutStringRefs = {};
}
function hasValidRef(config) {
{
if (hasOwnProperty.call(config, "ref")) {
var getter = Object.getOwnPropertyDescriptor(config, "ref").get;
if (getter && getter.isReactWarning) {
return false;
}
}
}
return config.ref !== void 0;
}
function hasValidKey(config) {
{
if (hasOwnProperty.call(config, "key")) {
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
if (getter && getter.isReactWarning) {
return false;
}
}
}
return config.key !== void 0;
}
function warnIfStringRefCannotBeAutoConverted(config, self) {
{
if (typeof config.ref === "string" && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {
var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);
if (!didWarnAboutStringRefs[componentName]) {
error('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref);
didWarnAboutStringRefs[componentName] = true;
}
}
}
}
function defineKeyPropWarningGetter(props, displayName) {
{
var warnAboutAccessingKey = function() {
if (!specialPropKeyWarningShown) {
specialPropKeyWarningShown = true;
error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName);
}
};
warnAboutAccessingKey.isReactWarning = true;
Object.defineProperty(props, "key", {
get: warnAboutAccessingKey,
configurable: true
});
}
}
function defineRefPropWarningGetter(props, displayName) {
{
var warnAboutAccessingRef = function() {
if (!specialPropRefWarningShown) {
specialPropRefWarningShown = true;
error("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName);
}
};
warnAboutAccessingRef.isReactWarning = true;
Object.defineProperty(props, "ref", {
get: warnAboutAccessingRef,
configurable: true
});
}
}
var ReactElement = function(type, key, ref, self, source, owner, props) {
var element = {
// This tag allows us to uniquely identify this as a React Element
$$typeof: REACT_ELEMENT_TYPE,
// Built-in properties that belong on the element
type,
key,
ref,
props,
// Record the component responsible for creating this element.
_owner: owner
};
{
element._store = {};
Object.defineProperty(element._store, "validated", {
configurable: false,
enumerable: false,
writable: true,
value: false
});
Object.defineProperty(element, "_self", {
configurable: false,
enumerable: false,
writable: false,
value: self
});
Object.defineProperty(element, "_source", {
configurable: false,
enumerable: false,
writable: false,
value: source
});
if (Object.freeze) {
Object.freeze(element.props);
Object.freeze(element);
}
}
return element;
};
function jsxDEV(type, config, maybeKey, source, self) {
{
var propName;
var props = {};
var key = null;
var ref = null;
if (maybeKey !== void 0) {
{
checkKeyStringCoercion(maybeKey);
}
key = "" + maybeKey;
}
if (hasValidKey(config)) {
{
checkKeyStringCoercion(config.key);
}
key = "" + config.key;
}
if (hasValidRef(config)) {
ref = config.ref;
warnIfStringRefCannotBeAutoConverted(config, self);
}
for (propName in config) {
if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
props[propName] = config[propName];
}
}
if (type && type.defaultProps) {
var defaultProps = type.defaultProps;
for (propName in defaultProps) {
if (props[propName] === void 0) {
props[propName] = defaultProps[propName];
}
}
}
if (key || ref) {
var displayName = typeof type === "function" ? type.displayName || type.name || "Unknown" : type;
if (key) {
defineKeyPropWarningGetter(props, displayName);
}
if (ref) {
defineRefPropWarningGetter(props, displayName);
}
}
return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
}
}
var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
function setCurrentlyValidatingElement$1(element) {
{
if (element) {
var owner = element._owner;
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
} else {
ReactDebugCurrentFrame$1.setExtraStackFrame(null);
}
}
}
var propTypesMisspellWarningShown;
{
propTypesMisspellWarningShown = false;
}
function isValidElement(object) {
{
return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
}
}
function getDeclarationErrorAddendum() {
{
if (ReactCurrentOwner$1.current) {
var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);
if (name) {
return "\n\nCheck the render method of `" + name + "`.";
}
}
return "";
}
}
function getSourceInfoErrorAddendum(source) {
{
if (source !== void 0) {
var fileName = source.fileName.replace(/^.*[\\\/]/, "");
var lineNumber = source.lineNumber;
return "\n\nCheck your code at " + fileName + ":" + lineNumber + ".";
}
return "";
}
}
var ownerHasKeyUseWarning = {};
function getCurrentComponentErrorInfo(parentType) {
{
var info = getDeclarationErrorAddendum();
if (!info) {
var parentName = typeof parentType === "string" ? parentType : parentType.displayName || parentType.name;
if (parentName) {
info = "\n\nCheck the top-level render call using <" + parentName + ">.";
}
}
return info;
}
}
function validateExplicitKey(element, parentType) {
{
if (!element._store || element._store.validated || element.key != null) {
return;
}
element._store.validated = true;
var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
return;
}
ownerHasKeyUseWarning[currentComponentErrorInfo] = true;
var childOwner = "";
if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {
childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
}
setCurrentlyValidatingElement$1(element);
error('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);
setCurrentlyValidatingElement$1(null);
}
}
function validateChildKeys(node, parentType) {
{
if (typeof node !== "object") {
return;
}
if (isArray(node)) {
for (var i = 0; i < node.length; i++) {
var child = node[i];
if (isValidElement(child)) {
validateExplicitKey(child, parentType);
}
}
} else if (isValidElement(node)) {
if (node._store) {
node._store.validated = true;
}
} else if (node) {
var iteratorFn = getIteratorFn(node);
if (typeof iteratorFn === "function") {
if (iteratorFn !== node.entries) {
var iterator = iteratorFn.call(node);
var step;
while (!(step = iterator.next()).done) {
if (isValidElement(step.value)) {
validateExplicitKey(step.value, parentType);
}
}
}
}
}
}
}
function validatePropTypes(element) {
{
var type = element.type;
if (type === null || type === void 0 || typeof type === "string") {
return;
}
var propTypes;
if (typeof type === "function") {
propTypes = type.propTypes;
} else if (typeof type === "object" && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
// Inner props are checked in the reconciler.
type.$$typeof === REACT_MEMO_TYPE)) {
propTypes = type.propTypes;
} else {
return;
}
if (propTypes) {
var name = getComponentNameFromType(type);
checkPropTypes(propTypes, element.props, "prop", name, element);
} else if (type.PropTypes !== void 0 && !propTypesMisspellWarningShown) {
propTypesMisspellWarningShown = true;
var _name = getComponentNameFromType(type);
error("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _name || "Unknown");
}
if (typeof type.getDefaultProps === "function" && !type.getDefaultProps.isReactClassApproved) {
error("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
}
}
}
function validateFragmentProps(fragment) {
{
var keys = Object.keys(fragment.props);
for (var i = 0; i < keys.length; i++) {
var key = keys[i];
if (key !== "children" && key !== "key") {
setCurrentlyValidatingElement$1(fragment);
error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", key);
setCurrentlyValidatingElement$1(null);
break;
}
}
if (fragment.ref !== null) {
setCurrentlyValidatingElement$1(fragment);
error("Invalid attribute `ref` supplied to `React.Fragment`.");
setCurrentlyValidatingElement$1(null);
}
}
}
function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
{
var validType = isValidElementType(type);
if (!validType) {
var info = "";
if (type === void 0 || typeof type === "object" && type !== null && Object.keys(type).length === 0) {
info += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";
}
var sourceInfo = getSourceInfoErrorAddendum(source);
if (sourceInfo) {
info += sourceInfo;
} else {
info += getDeclarationErrorAddendum();
}
var typeString;
if (type === null) {
typeString = "null";
} else if (isArray(type)) {
typeString = "array";
} else if (type !== void 0 && type.$$typeof === REACT_ELEMENT_TYPE) {
typeString = "<" + (getComponentNameFromType(type.type) || "Unknown") + " />";
info = " Did you accidentally export a JSX literal instead of a component?";
} else {
typeString = typeof type;
}
error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info);
}
var element = jsxDEV(type, props, key, source, self);
if (element == null) {
return element;
}
if (validType) {
var children = props.children;
if (children !== void 0) {
if (isStaticChildren) {
if (isArray(children)) {
for (var i = 0; i < children.length; i++) {
validateChildKeys(children[i], type);
}
if (Object.freeze) {
Object.freeze(children);
}
} else {
error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
}
} else {
validateChildKeys(children, type);
}
}
}
if (type === REACT_FRAGMENT_TYPE) {
validateFragmentProps(element);
} else {
validatePropTypes(element);
}
return element;
}
}
function
frontend/node_modules/.vite/deps/chunk-G3PMV62Z.js (Line 8:8 - Line 31:7), frontend/node_modules/@tanstack/query-core/build/legacy/removable.cjs (Line 7:2 - Line 29:4)
;
};
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
export
frontend/node_modules/zustand/vanilla.js (Line 1:1 - Line 29:3), frontend/node_modules/zustand/umd/vanilla.development.js (Line 5:2 - Line 33:2)
'use strict';
var createStoreImpl = function createStoreImpl(createState) {
var state;
var listeners = new Set();
var setState = function setState(partial, replace) {
var nextState = typeof partial === 'function' ? partial(state) : partial;
if (!Object.is(nextState, state)) {
var _previousState = state;
state = (replace != null ? replace : typeof nextState !== 'object' || nextState === null) ? nextState : Object.assign({}, state, nextState);
listeners.forEach(function (listener) {
return listener(state, _previousState);
});
}
};
var getState = function getState() {
return state;
};
var getInitialState = function getInitialState() {
return initialState;
};
var subscribe = function subscribe(listener) {
listeners.add(listener);
return function () {
return listeners.delete(listener);
};
};
var destroy = function destroy() {
if
frontend/node_modules/zustand/vanilla.js (Line 29:2 - Line 48:3), frontend/node_modules/zustand/umd/vanilla.development.js (Line 33:7 - Line 52:2)
{
console.warn('[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected.');
}
listeners.clear();
};
var api = {
setState: setState,
getState: getState,
getInitialState: getInitialState,
subscribe: subscribe,
destroy: destroy
};
var initialState = state = createState(setState, getState, api);
return api;
};
var createStore = function createStore(createState) {
return createState ? createStoreImpl(createState) : createStoreImpl;
};
var vanilla = (function (createState) {
if
frontend/node_modules/zustand/traditional.js (Line 5:2 - Line 36:2), frontend/node_modules/zustand/umd/traditional.development.js (Line 5:13 - Line 36:2)
;
var useDebugValue = ReactExports.useDebugValue;
var useSyncExternalStoreWithSelector = useSyncExternalStoreExports.useSyncExternalStoreWithSelector;
var identity = function identity(arg) {
return arg;
};
function useStoreWithEqualityFn(api, selector, equalityFn) {
if (selector === void 0) {
selector = identity;
}
var slice = useSyncExternalStoreWithSelector(api.subscribe, api.getState, api.getServerState || api.getInitialState, selector, equalityFn);
useDebugValue(slice);
return slice;
}
var createWithEqualityFnImpl = function createWithEqualityFnImpl(createState, defaultEqualityFn) {
var api = vanilla.createStore(createState);
var useBoundStoreWithEqualityFn = function useBoundStoreWithEqualityFn(selector, equalityFn) {
if (equalityFn === void 0) {
equalityFn = defaultEqualityFn;
}
return useStoreWithEqualityFn(api, selector, equalityFn);
};
Object.assign(useBoundStoreWithEqualityFn, api);
return useBoundStoreWithEqualityFn;
};
var createWithEqualityFn = function createWithEqualityFn(createState, defaultEqualityFn) {
return createState ? createWithEqualityFnImpl(createState, defaultEqualityFn) : createWithEqualityFnImpl;
};
exports.createWithEqualityFn = createWithEqualityFn;
exports.useStoreWithEqualityFn = useStoreWithEqualityFn;
frontend/node_modules/zustand/shallow.js (Line 1:1 - Line 76:3), frontend/node_modules/zustand/umd/vanilla/shallow.development.js (Line 5:2 - Line 80:2)
'use strict';
function _arrayLikeToArray(r, a) {
(null == a || a > r.length) && (a = r.length);
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
return n;
}
function _createForOfIteratorHelperLoose(r, e) {
var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
if (t) return (t = t.call(r)).next.bind(t);
if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e) {
t && (r = t);
var o = 0;
return function () {
return o >= r.length ? {
done: !0
} : {
done: !1,
value: r[o++]
};
};
}
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
function _unsupportedIterableToArray(r, a) {
if (r) {
if ("string" == typeof r) return _arrayLikeToArray(r, a);
var t = {}.toString.call(r).slice(8, -1);
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
}
}
function shallow$1(objA, objB) {
if (Object.is(objA, objB)) {
return true;
}
if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {
return false;
}
if (objA instanceof Map && objB instanceof Map) {
if (objA.size !== objB.size) return false;
for (var _iterator = _createForOfIteratorHelperLoose(objA), _step; !(_step = _iterator()).done;) {
var _step$value = _step.value,
key = _step$value[0],
value = _step$value[1];
if (!Object.is(value, objB.get(key))) {
return false;
}
}
return true;
}
if (objA instanceof Set && objB instanceof Set) {
if (objA.size !== objB.size) return false;
for (var _iterator2 = _createForOfIteratorHelperLoose(objA), _step2; !(_step2 = _iterator2()).done;) {
var _value = _step2.value;
if (!objB.has(_value)) {
return false;
}
}
return true;
}
var keysA = Object.keys(objA);
if (keysA.length !== Object.keys(objB).length) {
return false;
}
for (var _i = 0, _keysA = keysA; _i < _keysA.length; _i++) {
var keyA = _keysA[_i];
if (!Object.prototype.hasOwnProperty.call(objB, keyA) || !Object.is(objA[keyA], objB[keyA])) {
return false;
}
}
return true;
}
var shallow = (function (objA, objB) {
if
frontend/node_modules/zustand/middleware.js (Line 1:1 - Line 89:8), frontend/node_modules/zustand/umd/middleware.development.js (Line 5:2 - Line 93:14)
'use strict';
function _extends() {
return _extends = Object.assign ? Object.assign.bind() : function (n) {
for (var e = 1; e < arguments.length; e++) {
var t = arguments[e];
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
}
return n;
}, _extends.apply(null, arguments);
}
function _objectWithoutPropertiesLoose(r, e) {
if (null == r) return {};
var t = {};
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
if (e.includes(n)) continue;
t[n] = r[n];
}
return t;
}
var reduxImpl = function reduxImpl(reducer, initial) {
return function (set, _get, api) {
api.dispatch = function (action) {
set(function (state) {
return reducer(state, action);
}, false, action);
return action;
};
api.dispatchFromDevtools = true;
return _extends({
dispatch: function dispatch() {
var _ref;
return (_ref = api).dispatch.apply(_ref, arguments);
}
}, initial);
};
};
var redux = reduxImpl;
var _excluded = ["enabled", "anonymousActionType", "store"],
_excluded2 = ["connection"];
var trackedConnections = new Map();
var getTrackedConnectionState = function getTrackedConnectionState(name) {
var api = trackedConnections.get(name);
if (!api) return {};
return Object.fromEntries(Object.entries(api.stores).map(function (_ref) {
var key = _ref[0],
api = _ref[1];
return [key, api.getState()];
}));
};
var extractConnectionInformation = function extractConnectionInformation(store, extensionConnector, options) {
if (store === undefined) {
return {
type: 'untracked',
connection: extensionConnector.connect(options)
};
}
var existingConnection = trackedConnections.get(options.name);
if (existingConnection) {
return _extends({
type: 'tracked',
store: store
}, existingConnection);
}
var newConnection = {
connection: extensionConnector.connect(options),
stores: {}
};
trackedConnections.set(options.name, newConnection);
return _extends({
type: 'tracked',
store: store
}, newConnection);
};
var devtoolsImpl = function devtoolsImpl(fn, devtoolsOptions) {
if (devtoolsOptions === void 0) {
devtoolsOptions = {};
}
return function (set, get, api) {
var _devtoolsOptions = devtoolsOptions,
enabled = _devtoolsOptions.enabled,
anonymousActionType = _devtoolsOptions.anonymousActionType,
store = _devtoolsOptions.store,
options = _objectWithoutPropertiesLoose(_devtoolsOptions, _excluded);
var extensionConnector;
try {
extensionConnector = (enabled != null ? enabled : process
frontend/node_modules/zustand/middleware.js (Line 92:2 - Line 143:8), frontend/node_modules/zustand/umd/middleware.development.js (Line 96:2 - Line 147:2)
enabled) {
console.warn('[zustand devtools middleware] Please install/enable Redux devtools extension');
}
return fn(set, get, api);
}
var _extractConnectionInf = extractConnectionInformation(store, extensionConnector, options),
connection = _extractConnectionInf.connection,
connectionInformation = _objectWithoutPropertiesLoose(_extractConnectionInf, _excluded2);
var isRecording = true;
api.setState = function (state, replace, nameOrAction) {
var _extends2;
var r = set(state, replace);
if (!isRecording) return r;
var action = nameOrAction === undefined ? {
type: anonymousActionType || 'anonymous'
} : typeof nameOrAction === 'string' ? {
type: nameOrAction
} : nameOrAction;
if (store === undefined) {
connection == null || connection.send(action, get());
return r;
}
connection == null || connection.send(_extends({}, action, {
type: store + "/" + action.type
}), _extends({}, getTrackedConnectionState(options.name), (_extends2 = {}, _extends2[store] = api.getState(), _extends2)));
return r;
};
var setStateFromDevtools = function setStateFromDevtools() {
var originalIsRecording = isRecording;
isRecording = false;
set.apply(void 0, arguments);
isRecording = originalIsRecording;
};
var initialState = fn(api.setState, get, api);
if (connectionInformation.type === 'untracked') {
connection == null || connection.init(initialState);
} else {
connectionInformation.stores[connectionInformation.store] = api;
connection == null || connection.init(Object.fromEntries(Object.entries(connectionInformation.stores).map(function (_ref2) {
var key = _ref2[0],
store = _ref2[1];
return [key, key === connectionInformation.store ? initialState : store.getState()];
})));
}
if (api.dispatchFromDevtools && typeof api.dispatch === 'function') {
var didWarnAboutReservedActionType = false;
var originalDispatch = api.dispatch;
api.dispatch = function () {
for (var _len = arguments.length, a = new Array(_len), _key = 0; _key < _len; _key++) {
a[_key] = arguments[_key];
}
if (process
frontend/node_modules/zustand/middleware.js (Line 143:2 - Line 595:3), frontend/node_modules/zustand/umd/middleware.development.js (Line 147:2 - Line 599:2)
a[0].type === '__setState' && !didWarnAboutReservedActionType) {
console.warn('[zustand devtools middleware] "__setState" action type is reserved ' + 'to set state from the devtools. Avoid using it.');
didWarnAboutReservedActionType = true;
}
originalDispatch.apply(void 0, a);
};
}
connection.subscribe(function (message) {
switch (message.type) {
case 'ACTION':
if (typeof message.payload !== 'string') {
console.error('[zustand devtools middleware] Unsupported action format');
return;
}
return parseJsonThen(message.payload, function (action) {
if (action.type === '__setState') {
if (store === undefined) {
setStateFromDevtools(action.state);
return;
}
if (Object.keys(action.state).length !== 1) {
console.error("\n [zustand devtools middleware] Unsupported __setState action format. \n When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),\n and value of this only key should be a state object. Example: { \"type\": \"__setState\", \"state\": { \"abc123Store\": { \"foo\": \"bar\" } } }\n ");
}
var stateFromDevtools = action.state[store];
if (stateFromDevtools === undefined || stateFromDevtools === null) {
return;
}
if (JSON.stringify(api.getState()) !== JSON.stringify(stateFromDevtools)) {
setStateFromDevtools(stateFromDevtools);
}
return;
}
if (!api.dispatchFromDevtools) return;
if (typeof api.dispatch !== 'function') return;
api.dispatch(action);
});
case 'DISPATCH':
switch (message.payload.type) {
case 'RESET':
setStateFromDevtools(initialState);
if (store === undefined) {
return connection == null ? void 0 : connection.init(api.getState());
}
return connection == null ? void 0 : connection.init(getTrackedConnectionState(options.name));
case 'COMMIT':
if (store === undefined) {
connection == null || connection.init(api.getState());
return;
}
return connection == null ? void 0 : connection.init(getTrackedConnectionState(options.name));
case 'ROLLBACK':
return parseJsonThen(message.state, function (state) {
if (store === undefined) {
setStateFromDevtools(state);
connection == null || connection.init(api.getState());
return;
}
setStateFromDevtools(state[store]);
connection == null || connection.init(getTrackedConnectionState(options.name));
});
case 'JUMP_TO_STATE':
case 'JUMP_TO_ACTION':
return parseJsonThen(message.state, function (state) {
if (store === undefined) {
setStateFromDevtools(state);
return;
}
if (JSON.stringify(api.getState()) !== JSON.stringify(state[store])) {
setStateFromDevtools(state[store]);
}
});
case 'IMPORT_STATE':
{
var _nextLiftedState$comp;
var nextLiftedState = message.payload.nextLiftedState;
var lastComputedState = (_nextLiftedState$comp = nextLiftedState.computedStates.slice(-1)[0]) == null ? void 0 : _nextLiftedState$comp.state;
if (!lastComputedState) return;
if (store === undefined) {
setStateFromDevtools(lastComputedState);
} else {
setStateFromDevtools(lastComputedState[store]);
}
connection == null || connection.send(null, nextLiftedState);
return;
}
case 'PAUSE_RECORDING':
return isRecording = !isRecording;
}
return;
}
});
return initialState;
};
};
var devtools = devtoolsImpl;
var parseJsonThen = function parseJsonThen(stringified, f) {
var parsed;
try {
parsed = JSON.parse(stringified);
} catch (e) {
console.error('[zustand devtools middleware] Could not parse the received json', e);
}
if (parsed !== undefined) f(parsed);
};
var subscribeWithSelectorImpl = function subscribeWithSelectorImpl(fn) {
return function (set, get, api) {
var origSubscribe = api.subscribe;
api.subscribe = function (selector, optListener, options) {
var listener = selector;
if (optListener) {
var equalityFn = (options == null ? void 0 : options.equalityFn) || Object.is;
var currentSlice = selector(api.getState());
listener = function listener(state) {
var nextSlice = selector(state);
if (!equalityFn(currentSlice, nextSlice)) {
var previousSlice = currentSlice;
optListener(currentSlice = nextSlice, previousSlice);
}
};
if (options != null && options.fireImmediately) {
optListener(currentSlice, currentSlice);
}
}
return origSubscribe(listener);
};
var initialState = fn(set, get, api);
return initialState;
};
};
var subscribeWithSelector = subscribeWithSelectorImpl;
var combine = function combine(initialState, create) {
return function () {
return Object.assign({}, initialState, create.apply(void 0, arguments));
};
};
function createJSONStorage(getStorage, options) {
var storage;
try {
storage = getStorage();
} catch (_e) {
return;
}
var persistStorage = {
getItem: function getItem(name) {
var _getItem;
var parse = function parse(str) {
if (str === null) {
return null;
}
return JSON.parse(str, options == null ? void 0 : options.reviver);
};
var str = (_getItem = storage.getItem(name)) != null ? _getItem : null;
if (str instanceof Promise) {
return str.then(parse);
}
return parse(str);
},
setItem: function setItem(name, newValue) {
return storage.setItem(name, JSON.stringify(newValue, options == null ? void 0 : options.replacer));
},
removeItem: function removeItem(name) {
return storage.removeItem(name);
}
};
return persistStorage;
}
var _toThenable = function toThenable(fn) {
return function (input) {
try {
var result = fn(input);
if (result instanceof Promise) {
return result;
}
return {
then: function then(onFulfilled) {
return _toThenable(onFulfilled)(result);
},
catch: function _catch(_onRejected) {
return this;
}
};
} catch (e) {
return {
then: function then(_onFulfilled) {
return this;
},
catch: function _catch(onRejected) {
return _toThenable(onRejected)(e);
}
};
}
};
};
var oldImpl = function oldImpl(config, baseOptions) {
return function (set, get, api) {
var options = _extends({
getStorage: function getStorage() {
return localStorage;
},
serialize: JSON.stringify,
deserialize: JSON.parse,
partialize: function partialize(state) {
return state;
},
version: 0,
merge: function merge(persistedState, currentState) {
return _extends({}, currentState, persistedState);
}
}, baseOptions);
var _hasHydrated = false;
var hydrationListeners = new Set();
var finishHydrationListeners = new Set();
var storage;
try {
storage = options.getStorage();
} catch (_e) {}
if (!storage) {
return config(function () {
console.warn("[zustand persist middleware] Unable to update item '" + options.name + "', the given storage is currently unavailable.");
set.apply(void 0, arguments);
}, get, api);
}
var thenableSerialize = _toThenable(options.serialize);
var setItem = function setItem() {
var state = options.partialize(_extends({}, get()));
var errorInSync;
var thenable = thenableSerialize({
state: state,
version: options.version
}).then(function (serializedValue) {
return storage.setItem(options.name, serializedValue);
}).catch(function (e) {
errorInSync = e;
});
if (errorInSync) {
throw errorInSync;
}
return thenable;
};
var savedSetState = api.setState;
api.setState = function (state, replace) {
savedSetState(state, replace);
void setItem();
};
var configResult = config(function () {
set.apply(void 0, arguments);
void setItem();
}, get, api);
var stateFromStorage;
var hydrate = function hydrate() {
if (!storage) return;
_hasHydrated = false;
hydrationListeners.forEach(function (cb) {
return cb(get());
});
var postRehydrationCallback = (options.onRehydrateStorage == null ? void 0 : options.onRehydrateStorage(get())) || undefined;
return _toThenable(storage.getItem.bind(storage))(options.name).then(function (storageValue) {
if (storageValue) {
return options.deserialize(storageValue);
}
}).then(function (deserializedStorageValue) {
if (deserializedStorageValue) {
if (typeof deserializedStorageValue.version === 'number' && deserializedStorageValue.version !== options.version) {
if (options.migrate) {
return options.migrate(deserializedStorageValue.state, deserializedStorageValue.version);
}
console.error("State loaded from storage couldn't be migrated since no migrate function was provided");
} else {
return deserializedStorageValue.state;
}
}
}).then(function (migratedState) {
var _get;
stateFromStorage = options.merge(migratedState, (_get = get()) != null ? _get : configResult);
set(stateFromStorage, true);
return setItem();
}).then(function () {
postRehydrationCallback == null || postRehydrationCallback(stateFromStorage, undefined);
_hasHydrated = true;
finishHydrationListeners.forEach(function (cb) {
return cb(stateFromStorage);
});
}).catch(function (e) {
postRehydrationCallback == null || postRehydrationCallback(undefined, e);
});
};
api.persist = {
setOptions: function setOptions(newOptions) {
options = _extends({}, options, newOptions);
if (newOptions.getStorage) {
storage = newOptions.getStorage();
}
},
clearStorage: function clearStorage() {
var _storage;
(_storage = storage) == null || _storage.removeItem(options.name);
},
getOptions: function getOptions() {
return options;
},
rehydrate: function rehydrate() {
return hydrate();
},
hasHydrated: function hasHydrated() {
return _hasHydrated;
},
onHydrate: function onHydrate(cb) {
hydrationListeners.add(cb);
return function () {
hydrationListeners.delete(cb);
};
},
onFinishHydration: function onFinishHydration(cb) {
finishHydrationListeners.add(cb);
return function () {
finishHydrationListeners.delete(cb);
};
}
};
hydrate();
return stateFromStorage || configResult;
};
};
var newImpl = function newImpl(config, baseOptions) {
return function (set, get, api) {
var options = _extends({
storage: createJSONStorage(function () {
return localStorage;
}),
partialize: function partialize(state) {
return state;
},
version: 0,
merge: function merge(persistedState, currentState) {
return _extends({}, currentState, persistedState);
}
}, baseOptions);
var _hasHydrated2 = false;
var hydrationListeners = new Set();
var finishHydrationListeners = new Set();
var storage = options.storage;
if (!storage) {
return config(function () {
console.warn("[zustand persist middleware] Unable to update item '" + options.name + "', the given storage is currently unavailable.");
set.apply(void 0, arguments);
}, get, api);
}
var setItem = function setItem() {
var state = options.partialize(_extends({}, get()));
return storage.setItem(options.name, {
state: state,
version: options.version
});
};
var savedSetState = api.setState;
api.setState = function (state, replace) {
savedSetState(state, replace);
void setItem();
};
var configResult = config(function () {
set.apply(void 0, arguments);
void setItem();
}, get, api);
api.getInitialState = function () {
return configResult;
};
var stateFromStorage;
var hydrate = function hydrate() {
var _get3;
if (!storage) return;
_hasHydrated2 = false;
hydrationListeners.forEach(function (cb) {
var _get2;
return cb((_get2 = get()) != null ? _get2 : configResult);
});
var postRehydrationCallback = (options.onRehydrateStorage == null ? void 0 : options.onRehydrateStorage((_get3 = get()) != null ? _get3 : configResult)) || undefined;
return _toThenable(storage.getItem.bind(storage))(options.name).then(function (deserializedStorageValue) {
if (deserializedStorageValue) {
if (typeof deserializedStorageValue.version === 'number' && deserializedStorageValue.version !== options.version) {
if (options.migrate) {
return [true, options.migrate(deserializedStorageValue.state, deserializedStorageValue.version)];
}
console.error("State loaded from storage couldn't be migrated since no migrate function was provided");
} else {
return [false, deserializedStorageValue.state];
}
}
return [false, undefined];
}).then(function (migrationResult) {
var _get4;
var migrated = migrationResult[0],
migratedState = migrationResult[1];
stateFromStorage = options.merge(migratedState, (_get4 = get()) != null ? _get4 : configResult);
set(stateFromStorage, true);
if (migrated) {
return setItem();
}
}).then(function () {
postRehydrationCallback == null || postRehydrationCallback(stateFromStorage, undefined);
stateFromStorage = get();
_hasHydrated2 = true;
finishHydrationListeners.forEach(function (cb) {
return cb(stateFromStorage);
});
}).catch(function (e) {
postRehydrationCallback == null || postRehydrationCallback(undefined, e);
});
};
api.persist = {
setOptions: function setOptions(newOptions) {
options = _extends({}, options, newOptions);
if (newOptions.storage) {
storage = newOptions.storage;
}
},
clearStorage: function clearStorage() {
var _storage2;
(_storage2 = storage) == null || _storage2.removeItem(options.name);
},
getOptions: function getOptions() {
return options;
},
rehydrate: function rehydrate() {
return hydrate();
},
hasHydrated: function hasHydrated() {
return _hasHydrated2;
},
onHydrate: function onHydrate(cb) {
hydrationListeners.add(cb);
return function () {
hydrationListeners.delete(cb);
};
},
onFinishHydration: function onFinishHydration(cb) {
finishHydrationListeners.add(cb);
return function () {
finishHydrationListeners.delete(cb);
};
}
};
if (!options.skipHydration) {
hydrate();
}
return stateFromStorage || configResult;
};
};
var persistImpl = function persistImpl(config, baseOptions) {
if ('getStorage' in baseOptions || 'serialize' in baseOptions || 'deserialize' in baseOptions) {
if
frontend/node_modules/zustand/middleware.js (Line 595:2 - Line 609:2), frontend/node_modules/zustand/umd/middleware.development.js (Line 599:7 - Line 613:2)
frontend/node_modules/zustand/index.js (Line 5:2 - Line 17:8), frontend/node_modules/zustand/umd/index.development.js (Line 5:13 - Line 17:11)
;
var useDebugValue = ReactExports.useDebugValue;
var useSyncExternalStoreWithSelector = useSyncExternalStoreExports.useSyncExternalStoreWithSelector;
var didWarnAboutEqualityFn = false;
var identity = function identity(arg) {
return arg;
};
function useStore(api, selector, equalityFn) {
if (selector === void 0) {
selector = identity;
}
if (process
frontend/node_modules/zustand/index.js (Line 17:2 - Line 26:8), frontend/node_modules/zustand/umd/index.development.js (Line 17:2 - Line 26:7)
equalityFn && !didWarnAboutEqualityFn) {
console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937");
didWarnAboutEqualityFn = true;
}
var slice = useSyncExternalStoreWithSelector(api.subscribe, api.getState, api.getServerState || api.getInitialState, selector, equalityFn);
useDebugValue(slice);
return slice;
}
var createImpl = function createImpl(createState) {
if (process
frontend/node_modules/zustand/index.js (Line 26:2 - Line 40:3), frontend/node_modules/zustand/umd/index.development.js (Line 26:2 - Line 40:2)
typeof createState !== 'function') {
console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");
}
var api = typeof createState === 'function' ? vanilla.createStore(createState) : createState;
var useBoundStore = function useBoundStore(selector, equalityFn) {
return useStore(api, selector, equalityFn);
};
Object.assign(useBoundStore, api);
return useBoundStore;
};
var create = function create(createState) {
return createState ? createImpl(createState) : createImpl;
};
var react = (function (createState) {
if
frontend/node_modules/zustand/index.js (Line 40:2 - Line 56:7), frontend/node_modules/zustand/umd/index.development.js (Line 40:5 - Line 56:7)
frontend/node_modules/zustand/context.js (Line 4:2 - Line 22:3), frontend/node_modules/zustand/umd/middleware.development.js (Line 5:13 - Line 23:2)
;
function _extends() {
return _extends = Object.assign ? Object.assign.bind() : function (n) {
for (var e = 1; e < arguments.length; e++) {
var t = arguments[e];
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
}
return n;
}, _extends.apply(null, arguments);
}
var createElement = ReactExports.createElement,
reactCreateContext = ReactExports.createContext,
useContext = ReactExports.useContext,
useMemo = ReactExports.useMemo,
useRef = ReactExports.useRef;
function createContext() {
if
frontend/node_modules/zustand/context.js (Line 22:2 - Line 60:7), frontend/node_modules/zustand/umd/context.development.js (Line 23:5 - Line 61:7)
{
console.warn("[DEPRECATED] `context` will be removed in a future version. Instead use `import { createStore, useStore } from 'zustand'`. See: https://github.com/pmndrs/zustand/discussions/1180.");
}
var ZustandContext = reactCreateContext(undefined);
var Provider = function Provider(_ref) {
var createStore = _ref.createStore,
children = _ref.children;
var storeRef = useRef();
if (!storeRef.current) {
storeRef.current = createStore();
}
return createElement(ZustandContext.Provider, {
value: storeRef.current
}, children);
};
var useContextStore = function useContextStore(selector, equalityFn) {
var store = useContext(ZustandContext);
if (!store) {
throw new Error('Seems like you have not used zustand provider as an ancestor.');
}
return traditional.useStoreWithEqualityFn(store, selector, equalityFn);
};
var useStoreApi = function useStoreApi() {
var store = useContext(ZustandContext);
if (!store) {
throw new Error('Seems like you have not used zustand provider as an ancestor.');
}
return useMemo(function () {
return _extends({}, store);
}, [store]);
};
return {
Provider: Provider,
useStore: useContextStore,
useStoreApi: useStoreApi
};
}
module
frontend/node_modules/zod/index.cjs (Line 1:1 - Line 30:20), frontend/node_modules/zod/v4/mini/schemas.cjs (Line 1:1 - Line 30:17)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.z = void 0;
const z = __importStar(require("./v3/external.cjs"
frontend/node_modules/react-router-dom/server.mjs (Line 1:1 - Line 297:2), frontend/node_modules/react-router-dom/dist/server.mjs (Line 1:1 - Line 297:2)
import * as React from 'react';
import { Action, UNSAFE_invariant, isRouteErrorResponse, createStaticHandler as createStaticHandler$1, UNSAFE_convertRoutesToDataRoutes, IDLE_NAVIGATION, IDLE_FETCHER, IDLE_BLOCKER } from '@remix-run/router';
import { UNSAFE_useRoutesImpl, UNSAFE_mapRouteProperties } from 'react-router';
import { parsePath, Router, UNSAFE_DataRouterContext, UNSAFE_DataRouterStateContext, UNSAFE_FetchersContext, UNSAFE_ViewTransitionContext, createPath } from 'react-router-dom';
/**
* A `<Router>` that may not navigate to any other location. This is useful
* on the server where there is no stateful UI.
*/
function StaticRouter({
basename,
children,
location: locationProp = "/",
future
}) {
if (typeof locationProp === "string") {
locationProp = parsePath(locationProp);
}
let action = Action.Pop;
let location = {
pathname: locationProp.pathname || "/",
search: locationProp.search || "",
hash: locationProp.hash || "",
state: locationProp.state != null ? locationProp.state : null,
key: locationProp.key || "default"
};
let staticNavigator = getStatelessNavigator();
return /*#__PURE__*/React.createElement(Router, {
basename: basename,
children: children,
location: location,
navigationType: action,
navigator: staticNavigator,
future: future,
static: true
});
}
/**
* A Data Router that may not navigate to any other location. This is useful
* on the server where there is no stateful UI.
*/
function StaticRouterProvider({
context,
router,
hydrate = true,
nonce
}) {
!(router && context) ? process.env.NODE_ENV !== "production" ? UNSAFE_invariant(false, "You must provide `router` and `context` to <StaticRouterProvider>") : UNSAFE_invariant(false) : void 0;
let dataRouterContext = {
router,
navigator: getStatelessNavigator(),
static: true,
staticContext: context,
basename: context.basename || "/"
};
let fetchersContext = new Map();
let hydrateScript = "";
if (hydrate !== false) {
let data = {
loaderData: context.loaderData,
actionData: context.actionData,
errors: serializeErrors(context.errors)
};
// Use JSON.parse here instead of embedding a raw JS object here to speed
// up parsing on the client. Dual-stringify is needed to ensure all quotes
// are properly escaped in the resulting string. See:
// https://v8.dev/blog/cost-of-javascript-2019#json
let json = htmlEscape(JSON.stringify(JSON.stringify(data)));
hydrateScript = `window.__staticRouterHydrationData = JSON.parse(${json});`;
}
let {
state
} = dataRouterContext.router;
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(UNSAFE_DataRouterContext.Provider, {
value: dataRouterContext
}, /*#__PURE__*/React.createElement(UNSAFE_DataRouterStateContext.Provider, {
value: state
}, /*#__PURE__*/React.createElement(UNSAFE_FetchersContext.Provider, {
value: fetchersContext
}, /*#__PURE__*/React.createElement(UNSAFE_ViewTransitionContext.Provider, {
value: {
isTransitioning: false
}
}, /*#__PURE__*/React.createElement(Router, {
basename: dataRouterContext.basename,
location: state.location,
navigationType: state.historyAction,
navigator: dataRouterContext.navigator,
static: dataRouterContext.static,
future: {
v7_relativeSplatPath: router.future.v7_relativeSplatPath
}
}, /*#__PURE__*/React.createElement(DataRoutes, {
routes: router.routes,
future: router.future,
state: state
})))))), hydrateScript ? /*#__PURE__*/React.createElement("script", {
suppressHydrationWarning: true,
nonce: nonce,
dangerouslySetInnerHTML: {
__html: hydrateScript
}
}) : null);
}
function DataRoutes({
routes,
future,
state
}) {
return UNSAFE_useRoutesImpl(routes, undefined, state, future);
}
function serializeErrors(errors) {
if (!errors) return null;
let entries = Object.entries(errors);
let serialized = {};
for (let [key, val] of entries) {
// Hey you! If you change this, please change the corresponding logic in
// deserializeErrors in react-router-dom/index.tsx :)
if (isRouteErrorResponse(val)) {
serialized[key] = {
...val,
__type: "RouteErrorResponse"
};
} else if (val instanceof Error) {
// Do not serialize stack traces from SSR for security reasons
serialized[key] = {
message: val.message,
__type: "Error",
// If this is a subclass (i.e., ReferenceError), send up the type so we
// can re-create the same type during hydration.
...(val.name !== "Error" ? {
__subType: val.name
} : {})
};
} else {
serialized[key] = val;
}
}
return serialized;
}
function getStatelessNavigator() {
return {
createHref,
encodeLocation,
push(to) {
throw new Error(`You cannot use navigator.push() on the server because it is a stateless ` + `environment. This error was probably triggered when you did a ` + `\`navigate(${JSON.stringify(to)})\` somewhere in your app.`);
},
replace(to) {
throw new Error(`You cannot use navigator.replace() on the server because it is a stateless ` + `environment. This error was probably triggered when you did a ` + `\`navigate(${JSON.stringify(to)}, { replace: true })\` somewhere ` + `in your app.`);
},
go(delta) {
throw new Error(`You cannot use navigator.go() on the server because it is a stateless ` + `environment. This error was probably triggered when you did a ` + `\`navigate(${delta})\` somewhere in your app.`);
},
back() {
throw new Error(`You cannot use navigator.back() on the server because it is a stateless ` + `environment.`);
},
forward() {
throw new Error(`You cannot use navigator.forward() on the server because it is a stateless ` + `environment.`);
}
};
}
function createStaticHandler(routes, opts) {
return createStaticHandler$1(routes, {
...opts,
mapRouteProperties: UNSAFE_mapRouteProperties
});
}
function createStaticRouter(routes, context, opts = {}) {
let manifest = {};
let dataRoutes = UNSAFE_convertRoutesToDataRoutes(routes, UNSAFE_mapRouteProperties, undefined, manifest);
// Because our context matches may be from a framework-agnostic set of
// routes passed to createStaticHandler(), we update them here with our
// newly created/enhanced data routes
let matches = context.matches.map(match => {
let route = manifest[match.route.id] || match.route;
return {
...match,
route
};
});
let msg = method => `You cannot use router.${method}() on the server because it is a stateless environment`;
return {
get basename() {
return context.basename;
},
get future() {
return {
v7_fetcherPersist: false,
v7_normalizeFormMethod: false,
v7_partialHydration: opts.future?.v7_partialHydration === true,
v7_prependBasename: false,
v7_relativeSplatPath: opts.future?.v7_relativeSplatPath === true,
v7_skipActionErrorRevalidation: false
};
},
get state() {
return {
historyAction: Action.Pop,
location: context.location,
matches,
loaderData: context.loaderData,
actionData: context.actionData,
errors: context.errors,
initialized: true,
navigation: IDLE_NAVIGATION,
restoreScrollPosition: null,
preventScrollReset: false,
revalidation: "idle",
fetchers: new Map(),
blockers: new Map()
};
},
get routes() {
return dataRoutes;
},
get window() {
return undefined;
},
initialize() {
throw msg("initialize");
},
subscribe() {
throw msg("subscribe");
},
enableScrollRestoration() {
throw msg("enableScrollRestoration");
},
navigate() {
throw msg("navigate");
},
fetch() {
throw msg("fetch");
},
revalidate() {
throw msg("revalidate");
},
createHref,
encodeLocation,
getFetcher() {
return IDLE_FETCHER;
},
deleteFetcher() {
throw msg("deleteFetcher");
},
dispose() {
throw msg("dispose");
},
getBlocker() {
return IDLE_BLOCKER;
},
deleteBlocker() {
throw msg("deleteBlocker");
},
patchRoutes() {
throw msg("patchRoutes");
},
_internalFetchControllers: new Map(),
_internalActiveDeferreds: new Map(),
_internalSetRoutes() {
throw msg("_internalSetRoutes");
}
};
}
function createHref(to) {
return typeof to === "string" ? to : createPath(to);
}
function encodeLocation(to) {
let href = typeof to === "string" ? to : createPath(to);
// Treating this as a full URL will strip any trailing spaces so we need to
// pre-encode them since they might be part of a matching splat param from
// an ancestor route
href = href.replace(/ $/, "%20");
let encoded = ABSOLUTE_URL_REGEX.test(href) ? new URL(href) : new URL(href, "http://localhost");
return {
pathname: encoded.pathname,
search: encoded.search,
hash: encoded.hash
};
}
const ABSOLUTE_URL_REGEX = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;
// This utility is based on https://github.com/zertosh/htmlescape
// License: https://github.com/zertosh/htmlescape/blob/0527ca7156a524d256101bb310a9f970f63078ad/LICENSE
const ESCAPE_LOOKUP = {
"&": "\\u0026",
">": "\\u003e",
"<": "\\u003c",
"\u2028": "\\u2028",
"\u2029": "\\u2029"
};
const ESCAPE_REGEX = /[&><\u2028\u2029]/g;
function htmlEscape(str) {
return str.replace(ESCAPE_REGEX, match => ESCAPE_LOOKUP[match]);
}
export { StaticRouter, StaticRouterProvider, createStaticHandler, createStaticRouter };
frontend/node_modules/react-router-dom/server.js (Line 1:1 - Line 322:2), frontend/node_modules/react-router-dom/dist/server.js (Line 1:1 - Line 322:2)
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var React = require('react');
var router = require('@remix-run/router');
var reactRouter = require('react-router');
var reactRouterDom = require('react-router-dom');
function _interopNamespace(e) {
if (e && e.__esModule) return e;
var n = Object.create(null);
if (e) {
Object.keys(e).forEach(function (k) {
if (k !== 'default') {
var d = Object.getOwnPropertyDescriptor(e, k);
Object.defineProperty(n, k, d.get ? d : {
enumerable: true,
get: function () { return e[k]; }
});
}
});
}
n["default"] = e;
return Object.freeze(n);
}
var React__namespace = /*#__PURE__*/_interopNamespace(React);
/**
* A `<Router>` that may not navigate to any other location. This is useful
* on the server where there is no stateful UI.
*/
function StaticRouter({
basename,
children,
location: locationProp = "/",
future
}) {
if (typeof locationProp === "string") {
locationProp = reactRouterDom.parsePath(locationProp);
}
let action = router.Action.Pop;
let location = {
pathname: locationProp.pathname || "/",
search: locationProp.search || "",
hash: locationProp.hash || "",
state: locationProp.state != null ? locationProp.state : null,
key: locationProp.key || "default"
};
let staticNavigator = getStatelessNavigator();
return /*#__PURE__*/React__namespace.createElement(reactRouterDom.Router, {
basename: basename,
children: children,
location: location,
navigationType: action,
navigator: staticNavigator,
future: future,
static: true
});
}
/**
* A Data Router that may not navigate to any other location. This is useful
* on the server where there is no stateful UI.
*/
function StaticRouterProvider({
context,
router: router$1,
hydrate = true,
nonce
}) {
!(router$1 && context) ? process.env.NODE_ENV !== "production" ? router.UNSAFE_invariant(false, "You must provide `router` and `context` to <StaticRouterProvider>") : router.UNSAFE_invariant(false) : void 0;
let dataRouterContext = {
router: router$1,
navigator: getStatelessNavigator(),
static: true,
staticContext: context,
basename: context.basename || "/"
};
let fetchersContext = new Map();
let hydrateScript = "";
if (hydrate !== false) {
let data = {
loaderData: context.loaderData,
actionData: context.actionData,
errors: serializeErrors(context.errors)
};
// Use JSON.parse here instead of embedding a raw JS object here to speed
// up parsing on the client. Dual-stringify is needed to ensure all quotes
// are properly escaped in the resulting string. See:
// https://v8.dev/blog/cost-of-javascript-2019#json
let json = htmlEscape(JSON.stringify(JSON.stringify(data)));
hydrateScript = `window.__staticRouterHydrationData = JSON.parse(${json});`;
}
let {
state
} = dataRouterContext.router;
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(reactRouterDom.UNSAFE_DataRouterContext.Provider, {
value: dataRouterContext
}, /*#__PURE__*/React__namespace.createElement(reactRouterDom.UNSAFE_DataRouterStateContext.Provider, {
value: state
}, /*#__PURE__*/React__namespace.createElement(reactRouterDom.UNSAFE_FetchersContext.Provider, {
value: fetchersContext
}, /*#__PURE__*/React__namespace.createElement(reactRouterDom.UNSAFE_ViewTransitionContext.Provider, {
value: {
isTransitioning: false
}
}, /*#__PURE__*/React__namespace.createElement(reactRouterDom.Router, {
basename: dataRouterContext.basename,
location: state.location,
navigationType: state.historyAction,
navigator: dataRouterContext.navigator,
static: dataRouterContext.static,
future: {
v7_relativeSplatPath: router$1.future.v7_relativeSplatPath
}
}, /*#__PURE__*/React__namespace.createElement(DataRoutes, {
routes: router$1.routes,
future: router$1.future,
state: state
})))))), hydrateScript ? /*#__PURE__*/React__namespace.createElement("script", {
suppressHydrationWarning: true,
nonce: nonce,
dangerouslySetInnerHTML: {
__html: hydrateScript
}
}) : null);
}
function DataRoutes({
routes,
future,
state
}) {
return reactRouter.UNSAFE_useRoutesImpl(routes, undefined, state, future);
}
function serializeErrors(errors) {
if (!errors) return null;
let entries = Object.entries(errors);
let serialized = {};
for (let [key, val] of entries) {
// Hey you! If you change this, please change the corresponding logic in
// deserializeErrors in react-router-dom/index.tsx :)
if (router.isRouteErrorResponse(val)) {
serialized[key] = {
...val,
__type: "RouteErrorResponse"
};
} else if (val instanceof Error) {
// Do not serialize stack traces from SSR for security reasons
serialized[key] = {
message: val.message,
__type: "Error",
// If this is a subclass (i.e., ReferenceError), send up the type so we
// can re-create the same type during hydration.
...(val.name !== "Error" ? {
__subType: val.name
} : {})
};
} else {
serialized[key] = val;
}
}
return serialized;
}
function getStatelessNavigator() {
return {
createHref,
encodeLocation,
push(to) {
throw new Error(`You cannot use navigator.push() on the server because it is a stateless ` + `environment. This error was probably triggered when you did a ` + `\`navigate(${JSON.stringify(to)})\` somewhere in your app.`);
},
replace(to) {
throw new Error(`You cannot use navigator.replace() on the server because it is a stateless ` + `environment. This error was probably triggered when you did a ` + `\`navigate(${JSON.stringify(to)}, { replace: true })\` somewhere ` + `in your app.`);
},
go(delta) {
throw new Error(`You cannot use navigator.go() on the server because it is a stateless ` + `environment. This error was probably triggered when you did a ` + `\`navigate(${delta})\` somewhere in your app.`);
},
back() {
throw new Error(`You cannot use navigator.back() on the server because it is a stateless ` + `environment.`);
},
forward() {
throw new Error(`You cannot use navigator.forward() on the server because it is a stateless ` + `environment.`);
}
};
}
function createStaticHandler(routes, opts) {
return router.createStaticHandler(routes, {
...opts,
mapRouteProperties: reactRouter.UNSAFE_mapRouteProperties
});
}
function createStaticRouter(routes, context, opts = {}) {
let manifest = {};
let dataRoutes = router.UNSAFE_convertRoutesToDataRoutes(routes, reactRouter.UNSAFE_mapRouteProperties, undefined, manifest);
// Because our context matches may be from a framework-agnostic set of
// routes passed to createStaticHandler(), we update them here with our
// newly created/enhanced data routes
let matches = context.matches.map(match => {
let route = manifest[match.route.id] || match.route;
return {
...match,
route
};
});
let msg = method => `You cannot use router.${method}() on the server because it is a stateless environment`;
return {
get basename() {
return context.basename;
},
get future() {
return {
v7_fetcherPersist: false,
v7_normalizeFormMethod: false,
v7_partialHydration: opts.future?.v7_partialHydration === true,
v7_prependBasename: false,
v7_relativeSplatPath: opts.future?.v7_relativeSplatPath === true,
v7_skipActionErrorRevalidation: false
};
},
get state() {
return {
historyAction: router.Action.Pop,
location: context.location,
matches,
loaderData: context.loaderData,
actionData: context.actionData,
errors: context.errors,
initialized: true,
navigation: router.IDLE_NAVIGATION,
restoreScrollPosition: null,
preventScrollReset: false,
revalidation: "idle",
fetchers: new Map(),
blockers: new Map()
};
},
get routes() {
return dataRoutes;
},
get window() {
return undefined;
},
initialize() {
throw msg("initialize");
},
subscribe() {
throw msg("subscribe");
},
enableScrollRestoration() {
throw msg("enableScrollRestoration");
},
navigate() {
throw msg("navigate");
},
fetch() {
throw msg("fetch");
},
revalidate() {
throw msg("revalidate");
},
createHref,
encodeLocation,
getFetcher() {
return router.IDLE_FETCHER;
},
deleteFetcher() {
throw msg("deleteFetcher");
},
dispose() {
throw msg("dispose");
},
getBlocker() {
return router.IDLE_BLOCKER;
},
deleteBlocker() {
throw msg("deleteBlocker");
},
patchRoutes() {
throw msg("patchRoutes");
},
_internalFetchControllers: new Map(),
_internalActiveDeferreds: new Map(),
_internalSetRoutes() {
throw msg("_internalSetRoutes");
}
};
}
function createHref(to) {
return typeof to === "string" ? to : reactRouterDom.createPath(to);
}
function encodeLocation(to) {
let href = typeof to === "string" ? to : reactRouterDom.createPath(to);
// Treating this as a full URL will strip any trailing spaces so we need to
// pre-encode them since they might be part of a matching splat param from
// an ancestor route
href = href.replace(/ $/, "%20");
let encoded = ABSOLUTE_URL_REGEX.test(href) ? new URL(href) : new URL(href, "http://localhost");
return {
pathname: encoded.pathname,
search: encoded.search,
hash: encoded.hash
};
}
const ABSOLUTE_URL_REGEX = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;
// This utility is based on https://github.com/zertosh/htmlescape
// License: https://github.com/zertosh/htmlescape/blob/0527ca7156a524d256101bb310a9f970f63078ad/LICENSE
const ESCAPE_LOOKUP = {
"&": "\\u0026",
">": "\\u003e",
"<": "\\u003c",
"\u2028": "\\u2028",
"\u2029": "\\u2029"
};
const ESCAPE_REGEX = /[&><\u2028\u2029]/g;
function htmlEscape(str) {
return str.replace(ESCAPE_REGEX, match => ESCAPE_LOOKUP[match]);
}
exports.StaticRouter = StaticRouter;
exports.StaticRouterProvider = StaticRouterProvider;
exports.createStaticHandler = createStaticHandler;
exports.createStaticRouter = createStaticRouter;
frontend/node_modules/fraction.js/fraction.js (Line 563:8 - Line 570:6), frontend/node_modules/fraction.js/fraction.js (Line 548:7 - Line 555:5)
: function(places) {
places = Math.pow(10, places || 0);
if (isNaN(this["n"]) || isNaN(this["d"])) {
return new Fraction(NaN);
}
return newFraction(Math.floor
frontend/node_modules/fraction.js/fraction.js (Line 578:8 - Line 585:6), frontend/node_modules/fraction.js/fraction.js (Line 548:7 - Line 555:5)
: function(places) {
places = Math.pow(10, places || 0);
if (isNaN(this["n"]) || isNaN(this["d"])) {
return new Fraction(NaN);
}
return newFraction(Math.round
frontend/node_modules/fraction.js/fraction.js (Line 786:10 - Line 801:2), frontend/node_modules/fraction.js/fraction.js (Line 755:13 - Line 770:4)
: function(excludeWhole) {
var whole, str = "";
var n = this["n"];
var d = this["d"];
if (this["s"] < 0) {
str+= '-';
}
if (d === 1) {
str+= n;
} else {
if (excludeWhole && (whole = Math.floor(n / d)) > 0) {
str+= whole;
n
frontend/node_modules/fraction.js/fraction.cjs (Line 44:3 - Line 365:6), frontend/node_modules/fraction.js/fraction.js (Line 41:1 - Line 362:4)
// Maximum search depth for cyclic rational numbers. 2000 should be more than enough.
// Example: 1/7 = 0.(142857) has 6 repeating decimal places.
// If MAX_CYCLE_LEN gets reduced, long cycles will not be detected and toString() only gets the first 10 digits
var MAX_CYCLE_LEN = 2000;
// Parsed data to avoid calling "new" all the time
var P = {
"s": 1,
"n": 0,
"d": 1
};
function assign(n, s) {
if (isNaN(n = parseInt(n, 10))) {
throw InvalidParameter();
}
return n * s;
}
// Creates a new Fraction internally without the need of the bulky constructor
function newFraction(n, d) {
if (d === 0) {
throw DivisionByZero();
}
var f = Object.create(Fraction.prototype);
f["s"] = n < 0 ? -1 : 1;
n = n < 0 ? -n : n;
var a = gcd(n, d);
f["n"] = n / a;
f["d"] = d / a;
return f;
}
function factorize(num) {
var factors = {};
var n = num;
var i = 2;
var s = 4;
while (s <= n) {
while (n % i === 0) {
n/= i;
factors[i] = (factors[i] || 0) + 1;
}
s+= 1 + 2 * i++;
}
if (n !== num) {
if (n > 1)
factors[n] = (factors[n] || 0) + 1;
} else {
factors[num] = (factors[num] || 0) + 1;
}
return factors;
}
var parse = function(p1, p2) {
var n = 0, d = 1, s = 1;
var v = 0, w = 0, x = 0, y = 1, z = 1;
var A = 0, B = 1;
var C = 1, D = 1;
var N = 10000000;
var M;
if (p1 === undefined || p1 === null) {
/* void */
} else if (p2 !== undefined) {
n = p1;
d = p2;
s = n * d;
if (n % 1 !== 0 || d % 1 !== 0) {
throw NonIntegerParameter();
}
} else
switch (typeof p1) {
case "object":
{
if ("d" in p1 && "n" in p1) {
n = p1["n"];
d = p1["d"];
if ("s" in p1)
n*= p1["s"];
} else if (0 in p1) {
n = p1[0];
if (1 in p1)
d = p1[1];
} else {
throw InvalidParameter();
}
s = n * d;
break;
}
case "number":
{
if (p1 < 0) {
s = p1;
p1 = -p1;
}
if (p1 % 1 === 0) {
n = p1;
} else if (p1 > 0) { // check for != 0, scale would become NaN (log(0)), which converges really slow
if (p1 >= 1) {
z = Math.pow(10, Math.floor(1 + Math.log(p1) / Math.LN10));
p1/= z;
}
// Using Farey Sequences
// http://www.johndcook.com/blog/2010/10/20/best-rational-approximation/
while (B <= N && D <= N) {
M = (A + C) / (B + D);
if (p1 === M) {
if (B + D <= N) {
n = A + C;
d = B + D;
} else if (D > B) {
n = C;
d = D;
} else {
n = A;
d = B;
}
break;
} else {
if (p1 > M) {
A+= C;
B+= D;
} else {
C+= A;
D+= B;
}
if (B > N) {
n = C;
d = D;
} else {
n = A;
d = B;
}
}
}
n*= z;
} else if (isNaN(p1) || isNaN(p2)) {
d = n = NaN;
}
break;
}
case "string":
{
B = p1.match(/\d+|./g);
if (B === null)
throw InvalidParameter();
if (B[A] === '-') {// Check for minus sign at the beginning
s = -1;
A++;
} else if (B[A] === '+') {// Check for plus sign at the beginning
A++;
}
if (B.length === A + 1) { // Check if it's just a simple number "1234"
w = assign(B[A++], s);
} else if (B[A + 1] === '.' || B[A] === '.') { // Check if it's a decimal number
if (B[A] !== '.') { // Handle 0.5 and .5
v = assign(B[A++], s);
}
A++;
// Check for decimal places
if (A + 1 === B.length || B[A + 1] === '(' && B[A + 3] === ')' || B[A + 1] === "'" && B[A + 3] === "'") {
w = assign(B[A], s);
y = Math.pow(10, B[A].length);
A++;
}
// Check for repeating places
if (B[A] === '(' && B[A + 2] === ')' || B[A] === "'" && B[A + 2] === "'") {
x = assign(B[A + 1], s);
z = Math.pow(10, B[A + 1].length) - 1;
A+= 3;
}
} else if (B[A + 1] === '/' || B[A + 1] === ':') { // Check for a simple fraction "123/456" or "123:456"
w = assign(B[A], s);
y = assign(B[A + 2], 1);
A+= 3;
} else if (B[A + 3] === '/' && B[A + 1] === ' ') { // Check for a complex fraction "123 1/2"
v = assign(B[A], s);
w = assign(B[A + 2], s);
y = assign(B[A + 4], 1);
A+= 5;
}
if (B.length <= A) { // Check for more tokens on the stack
d = y * z;
s = /* void */
n = x + d * v + z * w;
break;
}
/* Fall through on error */
}
default:
throw InvalidParameter();
}
if (d === 0) {
throw DivisionByZero();
}
P["s"] = s < 0 ? -1 : 1;
P["n"] = Math.abs(n);
P["d"] = Math.abs(d);
};
function modpow(b, e, m) {
var r = 1;
for (; e > 0; b = (b * b) % m, e >>= 1) {
if (e & 1) {
r = (r * b) % m;
}
}
return r;
}
function cycleLen(n, d) {
for (; d % 2 === 0;
d/= 2) {
}
for (; d % 5 === 0;
d/= 5) {
}
if (d === 1) // Catch non-cyclic numbers
return 0;
// If we would like to compute really large numbers quicker, we could make use of Fermat's little theorem:
// 10^(d-1) % d == 1
// However, we don't need such large numbers and MAX_CYCLE_LEN should be the capstone,
// as we want to translate the numbers to strings.
var rem = 10 % d;
var t = 1;
for (; rem !== 1; t++) {
rem = rem * 10 % d;
if (t > MAX_CYCLE_LEN)
return 0; // Returning 0 here means that we don't print it as a cyclic number. It's likely that the answer is `d-1`
}
return t;
}
function cycleStart(n, d, len) {
var rem1 = 1;
var rem2 = modpow(10, len, d);
for (var t = 0; t < 300; t++) { // s < ~log10(Number.MAX_VALUE)
// Solve 10^s == 10^(s+t) (mod d)
if (rem1 === rem2)
return t;
rem1 = rem1 * 10 % d;
rem2 = rem2 * 10 % d;
}
return 0;
}
function gcd(a, b) {
if (!a)
return b;
if (!b)
return a;
while (1) {
a%= b;
if (!a)
return b;
b%= a;
if (!b)
return a;
}
};
/**
* Module constructor
*
* @constructor
* @param {number|Fraction=} a
* @param {number=} b
*/
frontend/node_modules/fraction.js/fraction.cjs (Line 366:3 - Line 394:9), frontend/node_modules/fraction.js/fraction.js (Line 363:2 - Line 391:7)
function Fraction(a, b) {
parse(a, b);
if (this instanceof Fraction) {
a = gcd(P["d"], P["n"]); // Abuse variable a
this["s"] = P["s"];
this["n"] = P["n"] / a;
this["d"] = P["d"] / a;
} else {
return newFraction(P['s'] * P['n'], P['d']);
}
}
var DivisionByZero = function() { return new Error("Division by Zero"); };
var InvalidParameter = function() { return new Error("Invalid argument"); };
var NonIntegerParameter = function() { return new Error("Parameters must be integer"); };
Fraction.prototype = {
"s": 1,
"n": 0,
"d": 1,
/**
* Calculates the absolute value
*
* Ex: new Fraction(-4).abs() => 4
**/
frontend/node_modules/fraction.js/fraction.cjs (Line 415:5 - Line 428:9), frontend/node_modules/fraction.js/fraction.js (Line 412:3 - Line 425:7)
frontend/node_modules/fraction.js/fraction.cjs (Line 581:5 - Line 595:9), frontend/node_modules/fraction.js/fraction.js (Line 578:3 - Line 592:7)
"round": function(places) {
places = Math.pow(10, places || 0);
if (isNaN(this["n"]) || isNaN(this["d"])) {
return new Fraction(NaN);
}
return newFraction(Math.round(places * this["s"] * this["n"] / this["d"]), places);
},
/**
* Rounds a rational number to a multiple of another rational number
*
* Ex: new Fraction('0.9').roundTo("1/8") => 7 / 8
**/
frontend/node_modules/fraction.js/fraction.cjs (Line 604:7 - Line 613:9), frontend/node_modules/fraction.js/fraction.js (Line 601:5 - Line 610:7)
parse(a, b);
return newFraction(this['s'] * Math.round(this['n'] * P['d'] / (this['d'] * P['n'])) * P['n'], P['d']);
},
/**
* Gets the inverse of the fraction, means numerator and denominator are exchanged
*
* Ex: new Fraction([-3, 4]).inverse() => -4 / 3
**/
frontend/node_modules/fraction.js/fraction.cjs (Line 624:5 - Line 688:9), frontend/node_modules/fraction.js/fraction.js (Line 621:3 - Line 685:7)
"pow": function(a, b) {
parse(a, b);
// Trivial case when exp is an integer
if (P['d'] === 1) {
if (P['s'] < 0) {
return newFraction(Math.pow(this['s'] * this["d"], P['n']), Math.pow(this["n"], P['n']));
} else {
return newFraction(Math.pow(this['s'] * this["n"], P['n']), Math.pow(this["d"], P['n']));
}
}
// Negative roots become complex
// (-a/b)^(c/d) = x
// <=> (-1)^(c/d) * (a/b)^(c/d) = x
// <=> (cos(pi) + i*sin(pi))^(c/d) * (a/b)^(c/d) = x # rotate 1 by 180°
// <=> (cos(c*pi/d) + i*sin(c*pi/d)) * (a/b)^(c/d) = x # DeMoivre's formula in Q ( https://proofwiki.org/wiki/De_Moivre%27s_Formula/Rational_Index )
// From which follows that only for c=0 the root is non-complex. c/d is a reduced fraction, so that sin(c/dpi)=0 occurs for d=1, which is handled by our trivial case.
if (this['s'] < 0) return null;
// Now prime factor n and d
var N = factorize(this['n']);
var D = factorize(this['d']);
// Exponentiate and take root for n and d individually
var n = 1;
var d = 1;
for (var k in N) {
if (k === '1') continue;
if (k === '0') {
n = 0;
break;
}
N[k]*= P['n'];
if (N[k] % P['d'] === 0) {
N[k]/= P['d'];
} else return null;
n*= Math.pow(k, N[k]);
}
for (var k in D) {
if (k === '1') continue;
D[k]*= P['n'];
if (D[k] % P['d'] === 0) {
D[k]/= P['d'];
} else return null;
d*= Math.pow(k, D[k]);
}
if (P['s'] < 0) {
return newFraction(d, n);
}
return newFraction(n, d);
},
/**
* Check if two rational numbers are the same
*
* Ex: new Fraction(19.6).equals([98, 5]);
**/
frontend/node_modules/fraction.js/fraction.cjs (Line 689:5 - Line 699:9), frontend/node_modules/fraction.js/fraction.js (Line 686:3 - Line 696:7)
"equals": function(a, b) {
parse(a, b);
return this["s"] * this["n"] * P["d"] === P["s"] * P["n"] * this["d"]; // Same as compare() === 0
},
/**
* Check if two rational numbers are the same
*
* Ex: new Fraction(19.6).equals([98, 5]);
**/
frontend/node_modules/fraction.js/fraction.cjs (Line 700:5 - Line 736:8), frontend/node_modules/fraction.js/fraction.js (Line 697:3 - Line 733:6)
"compare": function(a, b) {
parse(a, b);
var t = (this["s"] * this["n"] * P["d"] - P["s"] * P["n"] * this["d"]);
return (0 < t) - (t < 0);
},
"simplify": function(eps) {
if (isNaN(this['n']) || isNaN(this['d'])) {
return this;
}
eps = eps || 0.001;
var thisABS = this['abs']();
var cont = thisABS['toContinued']();
for (var i = 1; i < cont.length; i++) {
var s = newFraction(cont[i - 1], 1);
for (var k = i - 2; k >= 0; k--) {
s = s['inverse']()['add'](cont[k]);
}
if (Math.abs(s['sub'](thisABS).valueOf()) < eps) {
return s['mul'](this['s']);
}
}
return this;
},
/**
* Check if two rational numbers are divisible
*
* Ex: new Fraction(19.6).divisible(1.5);
*/
frontend/node_modules/fraction.js/fraction.cjs (Line 737:5 - Line 747:9), frontend/node_modules/fraction.js/fraction.js (Line 734:3 - Line 744:7)
"divisible": function(a, b) {
parse(a, b);
return !(!(P["n"] * this["d"]) || ((this["n"] * P["d"]) % (P["n"] * this["d"])));
},
/**
* Returns a decimal representation of the fraction
*
* Ex: new Fraction("100.'91823'").valueOf() => 100.91823918239183
**/
frontend/node_modules/fraction.js/fraction.cjs (Line 758:5 - Line 788:9), frontend/node_modules/fraction.js/fraction.js (Line 755:3 - Line 785:7)
'toFraction': function(excludeWhole) {
var whole, str = "";
var n = this["n"];
var d = this["d"];
if (this["s"] < 0) {
str+= '-';
}
if (d === 1) {
str+= n;
} else {
if (excludeWhole && (whole = Math.floor(n / d)) > 0) {
str+= whole;
str+= " ";
n%= d;
}
str+= n;
str+= '/';
str+= d;
}
return str;
},
/**
* Returns a latex representation of a Fraction object
*
* Ex: new Fraction("1.'3'").toLatex() => "\frac{4}{3}"
**/
frontend/node_modules/fraction.js/fraction.cjs (Line 789:5 - Line 820:8), frontend/node_modules/fraction.js/fraction.js (Line 786:3 - Line 817:6)
'toLatex': function(excludeWhole) {
var whole, str = "";
var n = this["n"];
var d = this["d"];
if (this["s"] < 0) {
str+= '-';
}
if (d === 1) {
str+= n;
} else {
if (excludeWhole && (whole = Math.floor(n / d)) > 0) {
str+= whole;
n%= d;
}
str+= "\\frac{";
str+= n;
str+= '}{';
str+= d;
str+= '}';
}
return str;
},
/**
* Returns an array of continued fraction elements
*
* Ex: new Fraction("7/8").toContinued() => [0,1,7]
*/
frontend/node_modules/fraction.js/fraction.cjs (Line 821:5 - Line 846:9), frontend/node_modules/fraction.js/fraction.js (Line 818:3 - Line 843:7)
'toContinued': function() {
var t;
var a = this['n'];
var b = this['d'];
var res = [];
if (isNaN(a) || isNaN(b)) {
return res;
}
do {
res.push(Math.floor(a / b));
t = a % b;
a = b;
b = t;
} while (a !== 1);
return res;
},
/**
* Creates a string representation of a fraction with all digits
*
* Ex: new Fraction("100.'91823'").toString() => "100.(91823)"
**/
frontend/node_modules/fraction.js/fraction.cjs (Line 847:5 - Line 894:2), frontend/node_modules/fraction.js/fraction.js (Line 844:3 - Line 891:2)
'toString': function(dec) {
var N = this["n"];
var D = this["d"];
if (isNaN(N) || isNaN(D)) {
return "NaN";
}
dec = dec || 15; // 15 = decimal places when no repetation
var cycLen = cycleLen(N, D); // Cycle length
var cycOff = cycleStart(N, D, cycLen); // Cycle start
var str = this['s'] < 0 ? "-" : "";
str+= N / D | 0;
N%= D;
N*= 10;
if (N)
str+= ".";
if (cycLen) {
for (var i = cycOff; i--;) {
str+= N / D | 0;
N%= D;
N*= 10;
}
str+= "(";
for (var i = cycLen; i--;) {
str+= N / D | 0;
N%= D;
N*= 10;
}
str+= ")";
} else {
for (var i = dec; N && i--;) {
str+= N / D | 0;
N%= D;
N*= 10;
}
}
return str;
}
};
frontend/node_modules/fraction.js/bigfraction.js (Line 185:2 - Line 219:2), frontend/node_modules/fraction.js/fraction.js (Line 168:15 - Line 202:3)
M = (A + C) / (B + D);
if (p1 === M) {
if (B + D <= N) {
n = A + C;
d = B + D;
} else if (D > B) {
n = C;
d = D;
} else {
n = A;
d = B;
}
break;
} else {
if (p1 > M) {
A+= C;
B+= D;
} else {
C+= A;
D+= B;
}
if (B > N) {
n = C;
d = D;
} else {
n = A;
d = B;
}
}
}
n =
frontend/node_modules/fraction.js/bigfraction.js (Line 351:2 - Line 379:6), frontend/node_modules/fraction.js/fraction.js (Line 334:2 - Line 354:2)
% d;
}
return 0;
}
function gcd(a, b) {
if (!a)
return b;
if (!b)
return a;
while (1) {
a%= b;
if (!a)
return b;
b%= a;
if (!b)
return a;
}
}
/**
* Module constructor
*
* @constructor
* @param {number|Fraction=} a
* @param {number=} b
*/
frontend/node_modules/fraction.js/bigfraction.js (Line 386:7 - Line 400:6), frontend/node_modules/fraction.js/fraction.js (Line 369:5 - Line 383:2)
this["s"] = P["s"];
this["n"] = P["n"] / a;
this["d"] = P["d"] / a;
} else {
return newFraction(P['s'] * P['n'], P['d']);
}
}
var DivisionByZero = function() {return new Error("Division by Zero");};
var InvalidParameter = function() {return new Error("Invalid argument");};
var NonIntegerParameter = function() {return new Error("Parameters must be integer");};
Fraction.prototype = {
"s": C_ONE
frontend/node_modules/fraction.js/bigfraction.js (Line 402:6 - Line 496:2), frontend/node_modules/fraction.js/fraction.cjs (Line 388:2 - Line 482:6)
,
/**
* Calculates the absolute value
*
* Ex: new Fraction(-4).abs() => 4
**/
"abs": function() {
return newFraction(this["n"], this["d"]);
},
/**
* Inverts the sign of the current fraction
*
* Ex: new Fraction(-4).neg() => 4
**/
"neg": function() {
return newFraction(-this["s"] * this["n"], this["d"]);
},
/**
* Adds two rational numbers
*
* Ex: new Fraction({n: 2, d: 3}).add("14.9") => 467 / 30
**/
"add": function(a, b) {
parse(a, b);
return newFraction(
this["s"] * this["n"] * P["d"] + P["s"] * this["d"] * P["n"],
this["d"] * P["d"]
);
},
/**
* Subtracts two rational numbers
*
* Ex: new Fraction({n: 2, d: 3}).add("14.9") => -427 / 30
**/
"sub": function(a, b) {
parse(a, b);
return newFraction(
this["s"] * this["n"] * P["d"] - P["s"] * this["d"] * P["n"],
this["d"] * P["d"]
);
},
/**
* Multiplies two rational numbers
*
* Ex: new Fraction("-17.(345)").mul(3) => 5776 / 111
**/
"mul": function(a, b) {
parse(a, b);
return newFraction(
this["s"] * P["s"] * this["n"] * P["n"],
this["d"] * P["d"]
);
},
/**
* Divides two rational numbers
*
* Ex: new Fraction("-17.(345)").inverse().div(3)
**/
"div": function(a, b) {
parse(a, b);
return newFraction(
this["s"] * P["s"] * this["n"] * P["d"],
this["d"] * P["n"]
);
},
/**
* Clones the actual object
*
* Ex: new Fraction("-17.(345)").clone()
**/
"clone": function() {
return newFraction(this['s'] * this['n'], this['d']);
},
/**
* Calculates the modulo of two rational numbers - a more precise fmod
*
* Ex: new Fraction('4.(3)').mod([7, 8]) => (13/3) % (7/8) = (5/6)
**/
"mod": function(a, b) {
if (a
frontend/node_modules/fraction.js/bigfraction.js (Line 497:6 - Line 550:7), frontend/node_modules/fraction.js/fraction.cjs (Line 487:2 - Line 540:2)
);
}
parse(a, b);
if (0 === P["n"] && 0 === this["d"]) {
throw DivisionByZero();
}
/*
* First silly attempt, kinda slow
*
return that["sub"]({
"n": num["n"] * Math.floor((this.n / this.d) / (num.n / num.d)),
"d": num["d"],
"s": this["s"]
});*/
/*
* New attempt: a1 / b1 = a2 / b2 * q + r
* => b2 * a1 = a2 * b1 * q + b1 * b2 * r
* => (b2 * a1 % a2 * b1) / (b1 * b2)
*/
return newFraction(
this["s"] * (P["d"] * this["n"]) % (P["n"] * this["d"]),
P["d"] * this["d"]
);
},
/**
* Calculates the fractional gcd of two rational numbers
*
* Ex: new Fraction(5,8).gcd(3,7) => 1/56
*/
"gcd": function(a, b) {
parse(a, b);
// gcd(a / b, c / d) = gcd(a, c) / lcm(b, d)
return newFraction(gcd(P["n"], this["n"]) * gcd(P["d"], this["d"]), P["d"] * this["d"]);
},
/**
* Calculates the fractional lcm of two rational numbers
*
* Ex: new Fraction(5,8).lcm(3,7) => 15
*/
"lcm": function(a, b) {
parse(a, b);
// lcm(a / b, c / d) = lcm(a, c) / gcd(b, d)
if (P["n"] === C_ZERO
frontend/node_modules/fraction.js/bigfraction.js (Line 624:7 - Line 649:4), frontend/node_modules/fraction.js/fraction.cjs (Line 678:2 - Line 703:4)
) {
return newFraction(d, n);
}
return newFraction(n, d);
},
/**
* Check if two rational numbers are the same
*
* Ex: new Fraction(19.6).equals([98, 5]);
**/
"equals": function(a, b) {
parse(a, b);
return this["s"] * this["n"] * P["d"] === P["s"] * P["n"] * this["d"]; // Same as compare() === 0
},
/**
* Check if two rational numbers are the same
*
* Ex: new Fraction(19.6).equals([98, 5]);
**/
"compare": function(a, b) {
parse(a, b);
let
frontend/node_modules/fraction.js/bigfraction.js (Line 708:2 - Line 728:25), frontend/node_modules/fraction.js/fraction.cjs (Line 729:5 - Line 750:7)
;
},
/**
* Check if two rational numbers are divisible
*
* Ex: new Fraction(19.6).divisible(1.5);
*/
"divisible": function(a, b) {
parse(a, b);
return !(!(P["n"] * this["d"]) || ((this["n"] * P["d"]) % (P["n"] * this["d"])));
},
/**
* Returns a decimal representation of the fraction
*
* Ex: new Fraction("100.'91823'").valueOf() => 100.91823918239183
**/
'valueOf': function() {
// Best we can do so far
frontend/node_modules/fraction.js/bigfraction.js (Line 819:10 - Line 831:2), frontend/node_modules/fraction.js/bigfraction.js (Line 791:13 - Line 803:4)
: function(excludeWhole) {
let n = this["n"];
let d = this["d"];
let str = this['s'] < C_ZERO ? "-" : "";
if (d === C_ONE) {
str+= n;
} else {
let whole = n / d;
if (excludeWhole && whole > C_ZERO) {
str+= whole;
n
frontend/node_modules/fraction.js/bigfraction.js (Line 874:2 - Line 884:2), frontend/node_modules/fraction.js/fraction.js (Line 718:2 - Line 727:2)
k = i - 2; k >= 0; k--) {
s = s['inverse']()['add'](cont[k]);
}
if (Math.abs(s['sub'](thisABS).valueOf()) < eps) {
return s['mul'](this['s']);
}
}
return this;
}
}
frontend/node_modules/eslint-plugin-react-refresh/index.js (Line 1:1 - Line 20:16), frontend/node_modules/@tanstack/react-query/build/modern/usePrefetchQuery.cjs (Line 1:1 - Line 21:27)
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/index.ts
json
frontend/node_modules/@tanstack/query-core/package.json (Line 11:3 - Line 41:2), frontend/node_modules/@tanstack/react-query/package.json (Line 11:3 - Line 40:2)
frontend/node_modules/tailwindcss/lib/postcss-plugins/nesting/README.md (Line 3:1 - Line 41:8), frontend/node_modules/tailwindcss/src/postcss-plugins/nesting/README.md (Line 3:1 - Line 41:8)
tailwindcss/nesting
This is a PostCSS plugin that wraps [postcss-nested](https://github.com/postcss/postcss-nested) or [postcss-nesting](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-nesting) and acts as a compatibility layer to make sure your nesting plugin of choice properly understands Tailwind's custom syntax like `@apply` and `@screen`.
Add it to your PostCSS configuration, somewhere before Tailwind itself:
```js
// postcss.config.js
module.exports = {
plugins: [
require('postcss-import'),
require('tailwindcss/nesting'),
require('tailwindcss'),
require('autoprefixer'),
]
}
```
By default, it uses the [postcss-nested](https://github.com/postcss/postcss-nested) plugin under the hood, which uses a Sass-like syntax and is the plugin that powers nesting support in the [Tailwind CSS plugin API](https://tailwindcss.com/docs/plugins#css-in-js-syntax).
If you'd rather use [postcss-nesting](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-nesting) (which is based on the work-in-progress [CSS Nesting](https://drafts.csswg.org/css-nesting-1/) specification), first install the plugin alongside:
```shell
npm install postcss-nesting
```
Then pass the plugin itself as an argument to `tailwindcss/nesting` in your PostCSS configuration:
```js
// postcss.config.js
module.exports = {
plugins: [
require('postcss-import'),
require('tailwindcss/nesting')(require('postcss-nesting')),
require('tailwindcss'),
require('autoprefixer'),
]
}
```
This can also be helpful if for whatever reason you need to use a very specific version of `postcss-nested` and want to override the version we bundle with `tailwin
frontend/node_modules/@remix-run/router/LICENSE.md (Line 8:2 - Line 17:4), frontend/shared/node_modules/typescript/ThirdPartyNoticeText.txt (Line 14:2 - Line 20:20)
to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE
frontend/node_modules/@remix-run/router/LICENSE.md (Line 17:2 - Line 22:9), frontend/shared/node_modules/typescript/ThirdPartyNoticeText.txt (Line 179:2 - Line 187:14)
PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE
frontend/node_modules/util-deprecate/README.md (Line 33:1 - Line 52:10), frontend/node_modules/@remix-run/router/LICENSE.md (Line 7:1 - Line 23:10)
Copyright (c) 2014 Nathan Rajlich <nathan@tootallnate.net>
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WI
frontend/node_modules/tailwind-merge/LICENSE.md (Line 5:1 - Line 21:10), frontend/node_modules/@remix-run/router/LICENSE.md (Line 7:1 - Line 23:10)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
frontend/node_modules/react-router-dom/LICENSE.md (Line 1:1 - Line 23:10), frontend/node_modules/@remix-run/router/LICENSE.md (Line 1:1 - Line 23:10)
MIT License
Copyright (c) React Training LLC 2015-2019
Copyright (c) Remix Software Inc. 2020-2021
Copyright (c) Shopify Inc. 2022-2023
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
frontend/node_modules/react-router/LICENSE.md (Line 1:1 - Line 23:10), frontend/node_modules/@remix-run/router/LICENSE.md (Line 1:1 - Line 23:10)
MIT License
Copyright (c) React Training LLC 2015-2019
Copyright (c) Remix Software Inc. 2020-2021
Copyright (c) Shopify Inc. 2022-2023
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
frontend/node_modules/react-router/CHANGELOG.md (Line 68:1 - Line 80:6), frontend/node_modules/@remix-run/router/CHANGELOG.md (Line 51:1 - Line 61:4)
### Patch Changes
- Update JSDoc URLs for new website structure (add /v6/ segment) ([#12141](https://github.com/remix-run/react-router/pull/12141))
- Updated dependencies:
- `@remix-run/router@1.21.0`
## 6.27.0
### Minor Changes
- Stabilize `unstable_patchRoutesOnNavigation` ([#11973](https://github.com/remix-run/react-router/pull/11973))
- Add new `PatchRoutesOnNavigationFunctionArgs` type for convenience ([#11967](https://github.com/remix-run/react-router/pull/11967))
- Stabilize `unstable_dataStrategy` ([#11974](https://github.com/remix-run/react-router/pull/11974))
- Stabilize the `unstable_flushSync` option for navigations and fetchers ([#11989](https://github.com/remix-run/react-router/pull/11989))
- Stabilize the `unstable_viewTransition` option for navigations and the corresponding `unstable_useViewTransitionState` hook ([#11989](https://github.com/remix-run/react-router/pull/11989))
### Patch Changes
- Fix bug when submitting to the current contextual route (parent route with an index child) when an `?index` param already exists from a prior submissi
frontend/node_modules/react-router/CHANGELOG.md (Line 121:1 - Line 128:11), frontend/node_modules/@remix-run/router/CHANGELOG.md (Line 127:1 - Line 134:9)
ny partial matches so that we can render ancestor `HydrateFallback` components
- Updated dependencies:
- `@remix-run/router@1.19.0`
## 6.25.1
No significant changes to this package were made in this release. [See the repo `CHANGELOG.md`](https://github.com/remix-run/react-router/blob/main/CHANGELOG.md) for an overview of all changes in v6.25.1.
## 6.25.0
### Minor Changes
- Stabilize `future.unstable_skipActionErrorRevalidation` as `future.v7_skipActionErrorRevalidation` ([#11769](
frontend/node_modules/react-router/CHANGELOG.md (Line 165:1 - Line 171:8), frontend/node_modules/@remix-run/router/CHANGELOG.md (Line 163:1 - Line 166:5)
frontend/node_modules/react-router/CHANGELOG.md (Line 228:1 - Line 361:9), frontend/node_modules/@remix-run/router/CHANGELOG.md (Line 266:1 - Line 399:6)
ttps://github.com/remix-run/react-router/pull/11199))
- Updated dependencies:
- `@remix-run/router@1.15.1`
## 6.22.0
### Patch Changes
- Updated dependencies:
- `@remix-run/router@1.15.0`
## 6.21.3
### Patch Changes
- Remove leftover `unstable_` prefix from `Blocker`/`BlockerFunction` types ([#11187](https://github.com/remix-run/react-router/pull/11187))
## 6.21.2
### Patch Changes
- Updated dependencies:
- `@remix-run/router@1.14.2`
## 6.21.1
### Patch Changes
- Fix bug with `route.lazy` not working correctly on initial SPA load when `v7_partialHydration` is specified ([#11121](https://github.com/remix-run/react-router/pull/11121))
- Updated dependencies:
- `@remix-run/router@1.14.1`
## 6.21.0
### Minor Changes
- Add a new `future.v7_relativeSplatPath` flag to implement a breaking bug fix to relative routing when inside a splat route. ([#11087](https://github.com/remix-run/react-router/pull/11087))
This fix was originally added in [#10983](https://github.com/remix-run/react-router/issues/10983) and was later reverted in [#11078](https://github.com/remix-run/react-router/pull/11078) because it was determined that a large number of existing applications were relying on the buggy behavior (see [#11052](https://github.com/remix-run/react-router/issues/11052))
**The Bug**
The buggy behavior is that without this flag, the default behavior when resolving relative paths is to _ignore_ any splat (`*`) portion of the current route path.
**The Background**
This decision was originally made thinking that it would make the concept of nested different sections of your apps in `<Routes>` easier if relative routing would _replace_ the current splat:
```jsx
<BrowserRouter>
<Routes>
<Route path="/" element={<Home />} />
<Route path="dashboard/*" element={<Dashboard />} />
</Routes>
</BrowserRouter>
```
Any paths like `/dashboard`, `/dashboard/team`, `/dashboard/projects` will match the `Dashboard` route. The dashboard component itself can then render nested `<Routes>`:
```jsx
function Dashboard() {
return (
<div>
<h2>Dashboard</h2>
<nav>
<Link to="/">Dashboard Home</Link>
<Link to="team">Team</Link>
<Link to="projects">Projects</Link>
</nav>
<Routes>
<Route path="/" element={<DashboardHome />} />
<Route path="team" element={<DashboardTeam />} />
<Route path="projects" element={<DashboardProjects />} />
</Routes>
</div>
);
}
```
Now, all links and route paths are relative to the router above them. This makes code splitting and compartmentalizing your app really easy. You could render the `Dashboard` as its own independent app, or embed it into your large app without making any changes to it.
**The Problem**
The problem is that this concept of ignoring part of a path breaks a lot of other assumptions in React Router - namely that `"."` always means the current location pathname for that route. When we ignore the splat portion, we start getting invalid paths when using `"."`:
```jsx
// If we are on URL /dashboard/team, and we want to link to /dashboard/team:
function DashboardTeam() {
// ❌ This is broken and results in <a href="/dashboard">
return <Link to=".">A broken link to the Current URL</Link>;
// ✅ This is fixed but super unintuitive since we're already at /dashboard/team!
return <Link to="./team">A broken link to the Current URL</Link>;
}
```
We've also introduced an issue that we can no longer move our `DashboardTeam` component around our route hierarchy easily - since it behaves differently if we're underneath a non-splat route, such as `/dashboard/:widget`. Now, our `"."` links will, properly point to ourself _inclusive of the dynamic param value_ so behavior will break from it's corresponding usage in a `/dashboard/*` route.
Even worse, consider a nested splat route configuration:
```jsx
<BrowserRouter>
<Routes>
<Route path="dashboard">
<Route path="*" element={<Dashboard />} />
</Route>
</Routes>
</BrowserRouter>
```
Now, a `<Link to=".">` and a `<Link to="..">` inside the `Dashboard` component go to the same place! That is definitely not correct!
Another common issue arose in Data Routers (and Remix) where any `<Form>` should post to it's own route `action` if you the user doesn't specify a form action:
```jsx
let router = createBrowserRouter({
path: "/dashboard",
children: [
{
path: "*",
action: dashboardAction,
Component() {
// ❌ This form is broken! It throws a 405 error when it submits because
// it tries to submit to /dashboard (without the splat value) and the parent
// `/dashboard` route doesn't have an action
return <Form method="post">...</Form>;
},
},
],
});
```
This is just a compounded issue from the above because the default location for a `Form` to submit to is itself (`"."`) - and if we ignore the splat portion, that now resolves to the parent route.
**The Solution**
If you are leveraging this behavior, it's recommended to enable the future flag, move your splat to it's own route, and leverage `../` for any links to "sibling" pages:
```jsx
<BrowserRouter>
<Routes>
<Route path="dashboard">
<Route index path="*" eleme
frontend/node_modules/react-router/CHANGELOG.md (Line 377:1 - Line 384:8), frontend/node_modules/@remix-run/router/CHANGELOG.md (Line 412:1 - Line 419:3)
l current pathname for my route" in all cases (including static, dynamic, and splat routes) and `..` always means "my parents pathname".
### Patch Changes
- Properly handle falsy error values in ErrorBoundary's ([#11071](https://github.com/remix-run/react-router/pull/11071))
- Updated dependencies:
- `@remix-run/router@1.14.0`
## 6.20.1
### Patch Changes
- Revert the `useResolvedPath` fix for splat routes due to a large number of applications that were relying on the buggy behavior (see <https://github.com/remix-run/react-router/issues/11052#issuec
frontend/node_modules/react-router/CHANGELOG.md (Line 425:1 - Line 435:8), frontend/node_modules/@remix-run/router/CHANGELOG.md (Line 486:1 - Line 496:4)
ically for `"."` paths inside a splat route which incorrectly dropped the splat portion of the URL. If you are relative routing via `"."` inside a splat route in your application you should double check that your logic is not relying on this buggy behavior and update accordingly.
- Updated dependencies:
- `@remix-run/router@1.12.0`
## 6.18.0
### Patch Changes
- Fix the `future` prop on `BrowserRouter`, `HashRouter` and `MemoryRouter` so that it accepts a `Partial<FutureConfig>` instead of requiring all flags to be included. ([#10962](https://github.com/remix-run/react-router/pull/10962))
- Updated dependencies:
- `@remix-run/router@1.11.0`
## 6.17.0
### Patch Changes
- Fix `RouterProvider` `future` prop type to be a `Partial<FutureConfig>` so that not all flags must be specified ([#10900](https://github.com/remix-run/react-router/pull/10900))
- Updated dependencies:
- `@remix-run/router@1.10.0`
## 6.16.0
### Minor Changes
- In order to move towards stricter TypeScript support in the future, we're aiming to replace current usages of `any` with `unknown` on exposed typings for user-provided data. To do this in Remix v2 without introducing breaking changes in React Router v6, we have added generics to a number of shared types. These continue to default to `any` in React Router and are overridden with `unknown` in Remix. In React Router v7 we plan to move these to `unknown` as a breaking change. ([#10843](https://github.com/remix-run/react-router/pull/10843))
- `Location` now accepts a generic for the `location.state` value
- `ActionFunctionArgs`/`ActionFunction`/`LoaderFunctionArgs`/`LoaderFunction` now accept a generic for the `context` parameter (only used in SSR usages via `createStaticHandler`)
- The return type of `useMatches` (now exported as `UIMatch`) accepts generics for `match.
frontend/node_modules/react-router/CHANGELOG.md (Line 565:1 - Line 576:4), frontend/node_modules/@remix-run/router/CHANGELOG.md (Line 628:1 - Line 639:8)
-run/react-router/pull/10394))
- Switched from `useSyncExternalStore` to `useState` for internal `@remix-run/router` router state syncing in `<RouterProvider>`. We found some [subtle bugs](https://codesandbox.io/s/use-sync-external-store-loop-9g7b81) where router state updates got propagated _before_ other normal `useState` updates, which could lead to footguns in `useEffect` calls. ([#10377](https://github.com/remix-run/react-router/pull/10377), [#10409](https://github.com/remix-run/react-router/pull/10409))
- Allow `useRevalidator()` to resolve a loader-driven error boundary scenario ([#10369](https://github.com/remix-run/react-router/pull/10369))
- Avoid unnecessary unsubscribe/resubscribes on router sta
frontend/node_modules/react-router/CHANGELOG.md (Line 622:1 - Line 680:8), frontend/node_modules/@remix-run/router/CHANGELOG.md (Line 648:1 - Line 708:4)
.com/remix-run/react-router/pull/10193))
- Updated dependencies:
- `@remix-run/router@1.5.0`
## 6.9.0
### Minor Changes
- React Router now supports an alternative way to define your route `element` and `errorElement` fields as React Components instead of React Elements. You can instead pass a React Component to the new `Component` and `ErrorBoundary` fields if you choose. There is no functional difference between the two, so use whichever approach you prefer 😀. You shouldn't be defining both, but if you do `Component`/`ErrorBoundary` will "win". ([#10045](https://github.com/remix-run/react-router/pull/10045))
**Example JSON Syntax**
```jsx
// Both of these work the same:
const elementRoutes = [{
path: '/',
element: <Home />,
errorElement: <HomeError />,
}]
const componentRoutes = [{
path: '/',
Component: Home,
ErrorBoundary: HomeError,
}]
function Home() { ... }
function HomeError() { ... }
```
**Example JSX Syntax**
```jsx
// Both of these work the same:
const elementRoutes = createRoutesFromElements(
<Route path='/' element={<Home />} errorElement={<HomeError /> } />
);
const componentRoutes = createRoutesFromElements(
<Route path='/' Component={Home} ErrorBoundary={HomeError} />
);
function Home() { ... }
function HomeError() { ... }
```
- **Introducing Lazy Route Modules!** ([#10045](https://github.com/remix-run/react-router/pull/10045))
In order to keep your application bundles small and support code-splitting of your routes, we've introduced a new `lazy()` route property. This is an async function that resolves the non-route-matching portions of your route definition (`loader`, `action`, `element`/`Component`, `errorElement`/`ErrorBoundary`, `shouldRevalidate`, `handle`).
Lazy routes are resolved on initial load and during the `loading` or `submitting` phase of a navigation or fetcher call. You cannot lazily define route-matching properties (`path`, `index`, `children`) since we only execute your lazy route functions after we've matched known routes.
Your `lazy` functions will typically return the result of a dynamic import.
```jsx
// In this example, we assume most folks land on the homepage so we include that
// in our critical-path bundle, but then we lazily load modules for /a and /b so
// they don't load until the user navigates to those routes
let routes = createRoutesFromElements(
<Route path="/" element={<Layout />}>
<Route index element={<Home />} />
frontend/node_modules/react-router/CHANGELOG.md (Line 764:2 - Line 796:8), frontend/node_modules/@remix-run/router/CHANGELOG.md (Line 796:2 - Line 828:8)
r blocking navigations within the app's location origin ([#9709](https://github.com/remix-run/react-router/pull/9709))
### Patch Changes
- Fix `generatePath` when optional params are present ([#9764](https://github.com/remix-run/react-router/pull/9764))
- Update `<Await>` to accept `ReactNode` as children function return result ([#9896](https://github.com/remix-run/react-router/pull/9896))
- Updated dependencies:
- `@remix-run/router@1.3.0`
## 6.6.2
### Patch Changes
- Ensure `useId` consistency during SSR ([#9805](https://github.com/remix-run/react-router/pull/9805))
## 6.6.1
### Patch Changes
- Updated dependencies:
- `@remix-run/router@1.2.1`
## 6.6.0
### Patch Changes
- Prevent `useLoaderData` usage in `errorElement` ([#9735](https://github.com/remix-run/react-router/pull/9735))
- Updated dependencies:
- `@remix-run/router@1.2.0`
## 6.5.0
This release introduces support for [Optional
frontend/node_modules/cssesc/LICENSE-MIT.txt (Line 3:1 - Line 20:10), frontend/node_modules/@remix-run/router/LICENSE.md (Line 7:1 - Line 23:10)
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
frontend/node_modules/arg/LICENSE.md (Line 5:1 - Line 21:10), frontend/node_modules/@remix-run/router/LICENSE.md (Line 7:1 - Line 23:10)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
tsx
frontend/node_modules/@hookform/resolvers/yup/src/__tests__/Form.tsx (Line 25:12 - Line 41:58), frontend/node_modules/@hookform/resolvers/zod/src/__tests__/Form.tsx (Line 25:12 - Line 41:58)
frontend/node_modules/@hookform/resolvers/vine/src/__tests__/Form.tsx (Line 44:59 - Line 53:54), frontend/node_modules/@hookform/resolvers/zod/src/__tests__/Form.tsx (Line 41:58 - Line 49:30)
, async () => {
const handleSubmit = vi.fn();
render(<TestComponent onSubmit={handleSubmit} />);
expect(screen.queryAllByRole('alert')).toHaveLength(0);
await user.click(screen.getByText(/submit/i));
expect(
screen.getByText(/The username field must have at least 1 characters/i
frontend/node_modules/@hookform/resolvers/vine/src/__tests__/Form-native-validation.tsx (Line 1:1 - Line 23:2), frontend/node_modules/@hookform/resolvers/vine/src/__tests__/Form.tsx (Line 1:1 - Line 25:2)
import { render, screen } from '@testing-library/react';
import user from '@testing-library/user-event';
import vine from '@vinejs/vine';
import { Infer } from '@vinejs/vine/build/src/types';
import React from 'react';
import { useForm } from 'react-hook-form';
import { vineResolver } from '..';
const schema = vine.compile(
vine.object({
username: vine.string().minLength(1),
password: vine.string().minLength(1),
}),
);
type FormData = Infer<typeof schema> & { unusedProperty: string };
interface Props {
onSubmit: (data: FormData) => void;
}
function TestComponent({ onSubmit }: Props) {
const { register, handleSubmit }
frontend/node_modules/@hookform/resolvers/vine/src/__tests__/Form-native-validation.tsx (Line 24:13 - Line 63:53), frontend/node_modules/@hookform/resolvers/zod/src/__tests__/Form-native-validation.tsx (Line 24:12 - Line 62:26)
(schema),
shouldUseNativeValidation: true,
});
return (
<form onSubmit={handleSubmit(onSubmit)}>
<input {...register('username')} placeholder="username" />
<input {...register('password')} placeholder="password" />
<button type="submit">submit</button>
</form>
);
}
test("form's native validation with Zod", async () => {
const handleSubmit = vi.fn();
render(<TestComponent onSubmit={handleSubmit} />);
// username
let usernameField = screen.getByPlaceholderText(
/username/i,
) as HTMLInputElement;
expect(usernameField.validity.valid).toBe(true);
expect(usernameField.validationMessage).toBe('');
// password
let passwordField = screen.getByPlaceholderText(
/password/i,
) as HTMLInputElement;
expect(passwordField.validity.valid).toBe(true);
expect(passwordField.validationMessage).toBe('');
await user.click(screen.getByText(/submit/i));
// username
usernameField = screen.getByPlaceholderText(/username/i) as HTMLInputElement;
expect(usernameField.validity.valid).toBe(false);
expect(usernameField.validationMessage).toBe(
'The username field must have at least 1 characters'
frontend/node_modules/@hookform/resolvers/vine/src/__tests__/Form-native-validation.tsx (Line 71:3 - Line 85:2), frontend/node_modules/@hookform/resolvers/zod/src/__tests__/Form-native-validation.tsx (Line 67:26 - Line 81:2)
frontend/node_modules/@hookform/resolvers/typanion/src/__tests__/Form.tsx (Line 45:63 - Line 55:59), frontend/node_modules/@hookform/resolvers/zod/src/__tests__/Form.tsx (Line 41:58 - Line 50:48)
, async () => {
const handleSubmit = vi.fn();
render(<TestComponent onSubmit={handleSubmit} />);
expect(screen.queryAllByRole('alert')).toHaveLength(0);
await user.click(screen.getByText(/submit/i));
expect(
screen.getAllByText(
'Expected to have a length of at least 1 elements (got 0)'
frontend/node_modules/@hookform/resolvers/typanion/src/__tests__/Form-native-validation.tsx (Line 9:59 - Line 27:13), frontend/node_modules/@hookform/resolvers/typanion/src/__tests__/Form.tsx (Line 6:5 - Line 26:10)
frontend/node_modules/@hookform/resolvers/superstruct/src/__tests__/Form.tsx (Line 41:66 - Line 51:80), frontend/node_modules/@hookform/resolvers/zod/src/__tests__/Form.tsx (Line 41:58 - Line 49:30)
, async () => {
const handleSubmit = vi.fn();
render(<TestComponent onSubmit={handleSubmit} />);
expect(screen.queryAllByRole('alert')).toHaveLength(0);
await user.click(screen.getByText(/submit/i));
expect(
screen.getByText(
/Expected a string with a length of `2` but received one with a length of `0`/i
frontend/node_modules/@hookform/resolvers/superstruct/src/__tests__/Form-native-validation.tsx (Line 1:1 - Line 20:13), frontend/node_modules/@hookform/resolvers/superstruct/src/__tests__/Form.tsx (Line 1:1 - Line 22:10)
import { render, screen } from '@testing-library/react';
import user from '@testing-library/user-event';
import React from 'react';
import { useForm } from 'react-hook-form';
import { Infer, object, size, string } from 'superstruct';
import { superstructResolver } from '..';
const schema = object({
username: size(string(), 2),
password: size(string(), 6),
});
type FormData = Infer<typeof schema>;
interface Props {
onSubmit: (data: FormData) => void;
}
function TestComponent({ onSubmit }: Props) {
const { register, handleSubmit
frontend/node_modules/@hookform/resolvers/superstruct/src/__tests__/Form-native-validation.tsx (Line 10:2 - Line 21:20), frontend/node_modules/@hookform/resolvers/typeschema/src/__tests__/Form-native-validation.tsx (Line 14:2 - Line 25:19)
frontend/node_modules/@hookform/resolvers/superstruct/src/__tests__/Form-native-validation.tsx (Line 36:44 - Line 60:79), frontend/node_modules/@hookform/resolvers/zod/src/__tests__/Form-native-validation.tsx (Line 39:36 - Line 62:26)
, async () => {
const handleSubmit = vi.fn();
render(<TestComponent onSubmit={handleSubmit} />);
// username
let usernameField = screen.getByPlaceholderText(
/username/i,
) as HTMLInputElement;
expect(usernameField.validity.valid).toBe(true);
expect(usernameField.validationMessage).toBe('');
// password
let passwordField = screen.getByPlaceholderText(
/password/i,
) as HTMLInputElement;
expect(passwordField.validity.valid).toBe(true);
expect(passwordField.validationMessage).toBe('');
await user.click(screen.getByText(/submit/i));
// username
usernameField = screen.getByPlaceholderText(/username/i) as HTMLInputElement;
expect(usernameField.validity.valid).toBe(false);
expect(usernameField.validationMessage).toBe(
'Expected a string with a length of `2` but received one with a length of `0`'
frontend/node_modules/@hookform/resolvers/superstruct/src/__tests__/Form-native-validation.tsx (Line 71:9 - Line 82:2), frontend/node_modules/@hookform/resolvers/zod/src/__tests__/Form-native-validation.tsx (Line 70:11 - Line 81:2)
);
// username
usernameField = screen.getByPlaceholderText(/username/i) as HTMLInputElement;
expect(usernameField.validity.valid).toBe(true);
expect(usernameField.validationMessage).toBe('');
// password
passwordField = screen.getByPlaceholderText(/password/i) as HTMLInputElement;
expect(passwordField.validity.valid).toBe(true);
expect(passwordField.validationMessage).toBe('');
});
frontend/node_modules/@hookform/resolvers/nope/src/__tests__/Form.tsx (Line 10:2 - Line 29:13), frontend/node_modules/@hookform/resolvers/typanion/src/__tests__/Form.tsx (Line 10:2 - Line 29:17)